diff --git a/Dalamud/Interface/DalamudInterface.cs b/Dalamud/Interface/DalamudInterface.cs index fe7e6c5c2..45a9a6daa 100644 --- a/Dalamud/Interface/DalamudInterface.cs +++ b/Dalamud/Interface/DalamudInterface.cs @@ -23,16 +23,6 @@ namespace Dalamud.Interface { private readonly Dalamud dalamud; - private ulong frameCount = 0; - - private bool isImguiDrawDemoWindow = false; - -#if DEBUG - private bool isImguiDrawDevMenu = true; -#else - private bool isImguiDrawDevMenu = false; -#endif - private readonly DalamudLogWindow logWindow; private readonly DalamudDataWindow dataWindow; private readonly DalamudCreditsWindow creditsWindow; @@ -44,6 +34,16 @@ namespace Dalamud.Interface private readonly WindowSystem windowSystem = new WindowSystem("DalamudCore"); + private ulong frameCount = 0; + + private bool isImguiDrawDemoWindow = false; + +#if DEBUG + private bool isImguiDrawDevMenu = true; +#else + private bool isImguiDrawDevMenu = false; +#endif + /// /// Initializes a new instance of the class. /// @@ -261,7 +261,7 @@ namespace Dalamud.Interface if (ImGui.MenuItem("Open Plugin Stats")) { - OpenPluginStats(); + this.OpenPluginStats(); } if (ImGui.MenuItem("Print plugin info")) @@ -344,6 +344,18 @@ namespace Dalamud.Interface ImGui.ShowDemoWindow(); } + /// + /// Dispose the window system and all windows that require it. + /// + public void Dispose() + { + this.windowSystem.RemoveAllWindows(); + + this.dalamud?.Dispose(); + this.logWindow?.Dispose(); + this.creditsWindow?.Dispose(); + } + /// /// Open the Plugin Installer window. /// @@ -407,14 +419,5 @@ namespace Dalamud.Interface { this.componentDemoWindow.IsOpen ^= true; } - - public void Dispose() - { - this.windowSystem.RemoveAllWindows(); - - this.dalamud?.Dispose(); - this.logWindow?.Dispose(); - this.creditsWindow?.Dispose(); - } } }