refactor: fix style in DalamudInterface.cs

This commit is contained in:
goat 2021-04-05 23:58:12 +02:00
parent 91b05fc9b4
commit c823d50d37

View file

@ -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
/// <summary>
/// Initializes a new instance of the <see cref="DalamudInterface"/> class.
/// </summary>
@ -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();
}
/// <summary>
/// Dispose the window system and all windows that require it.
/// </summary>
public void Dispose()
{
this.windowSystem.RemoveAllWindows();
this.dalamud?.Dispose();
this.logWindow?.Dispose();
this.creditsWindow?.Dispose();
}
/// <summary>
/// Open the Plugin Installer window.
/// </summary>
@ -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();
}
}
}