From 9f3be8f107710435491a1f0b7326fcba8be57546 Mon Sep 17 00:00:00 2001
From: LadyDefile <67084868+LadyDefile@users.noreply.github.com>
Date: Sat, 26 Feb 2022 13:29:29 -0600
Subject: [PATCH] * Added a method for retrieving a Window object by name.
---
Dalamud/Interface/Windowing/WindowSystem.cs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Dalamud/Interface/Windowing/WindowSystem.cs b/Dalamud/Interface/Windowing/WindowSystem.cs
index 16dfcdf5c..0cb1a1514 100644
--- a/Dalamud/Interface/Windowing/WindowSystem.cs
+++ b/Dalamud/Interface/Windowing/WindowSystem.cs
@@ -84,6 +84,13 @@ namespace Dalamud.Interface.Windowing
///
public void RemoveAllWindows() => this.windows.Clear();
+ ///
+ /// Get a window by name.
+ ///
+ /// The name of the
+ /// The object with matching name or null.
+ public Window? GetWindow(string windowName) => this.windows.FirstOrDefault(w => w.WindowName == windowName);
+
///
/// Draw all registered windows using ImGui.
///