# WindowSystem.cs

* Added a function "GetWindows()" that returns windows.ToArray() for collection access with encapsulation
This commit is contained in:
LadyDefile 2022-03-07 11:42:57 -06:00
parent 9f3be8f107
commit 9cfc1cd804

View file

@ -91,6 +91,12 @@ namespace Dalamud.Interface.Windowing
/// <returns>The <see cref="Window"/> object with matching name or null.</returns>
public Window? GetWindow(string windowName) => this.windows.FirstOrDefault(w => w.WindowName == windowName);
/// <summary>
/// Returns an array of all currently registered windows.
/// </summary>
/// <returns>Returns window collection as a <see cref="Window"/> array.</returns>
public Window[] GetWindows() => this.windows.ToArray();
/// <summary>
/// Draw all registered windows using ImGui.
/// </summary>