From 9cfc1cd804beede58a26acd1ae2542cc3b226ce0 Mon Sep 17 00:00:00 2001
From: LadyDefile <67084868+LadyDefile@users.noreply.github.com>
Date: Mon, 7 Mar 2022 11:42:57 -0600
Subject: [PATCH] # WindowSystem.cs * Added a function "GetWindows()" that
returns windows.ToArray() for collection access with encapsulation
---
Dalamud/Interface/Windowing/WindowSystem.cs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Dalamud/Interface/Windowing/WindowSystem.cs b/Dalamud/Interface/Windowing/WindowSystem.cs
index 0cb1a1514..21c94d2d4 100644
--- a/Dalamud/Interface/Windowing/WindowSystem.cs
+++ b/Dalamud/Interface/Windowing/WindowSystem.cs
@@ -91,6 +91,12 @@ namespace Dalamud.Interface.Windowing
/// The object with matching name or null.
public Window? GetWindow(string windowName) => this.windows.FirstOrDefault(w => w.WindowName == windowName);
+ ///
+ /// Returns an array of all currently registered windows.
+ ///
+ /// Returns window collection as a array.
+ public Window[] GetWindows() => this.windows.ToArray();
+
///
/// Draw all registered windows using ImGui.
///