From 84d0f6564d57634aa4c4380b004d91060b0cb2c1 Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Tue, 6 Apr 2021 00:14:58 +0200 Subject: [PATCH] feat: add extra ToggleX methods to DalamudInterface --- Dalamud/Interface/DalamudInterface.cs | 78 ++++++++++++++++++++++++--- 1 file changed, 71 insertions(+), 7 deletions(-) diff --git a/Dalamud/Interface/DalamudInterface.cs b/Dalamud/Interface/DalamudInterface.cs index 45a9a6daa..ae3587678 100644 --- a/Dalamud/Interface/DalamudInterface.cs +++ b/Dalamud/Interface/DalamudInterface.cs @@ -361,7 +361,7 @@ namespace Dalamud.Interface /// internal void OpenPluginInstaller() { - this.pluginWindow.IsOpen ^= true; + this.pluginWindow.IsOpen = true; } /// @@ -369,7 +369,7 @@ namespace Dalamud.Interface /// internal void OpenChangelog() { - this.changelogWindow.IsOpen ^= true; + this.changelogWindow.IsOpen = true; } /// @@ -377,7 +377,7 @@ namespace Dalamud.Interface /// internal void OpenSettings() { - this.settingsWindow.IsOpen ^= true; + this.settingsWindow.IsOpen = true; } /// @@ -385,7 +385,7 @@ namespace Dalamud.Interface /// internal void OpenLog() { - this.logWindow.IsOpen ^= true; + this.logWindow.IsOpen = true; } /// @@ -393,7 +393,7 @@ namespace Dalamud.Interface /// internal void OpenData() { - this.dataWindow.IsOpen ^= true; + this.dataWindow.IsOpen = true; } /// @@ -401,7 +401,7 @@ namespace Dalamud.Interface /// internal void OpenCredits() { - this.creditsWindow.IsOpen ^= true; + this.creditsWindow.IsOpen = true; } /// @@ -409,13 +409,77 @@ namespace Dalamud.Interface /// internal void OpenPluginStats() { - this.pluginStatWindow.IsOpen ^= true; + this.pluginStatWindow.IsOpen = true; } /// /// Open the component test window. /// internal void OpenComponentDemo() + { + this.componentDemoWindow.IsOpen = true; + } + + /// + /// Toggle the Plugin Installer window. + /// + internal void TogglePluginInstaller() + { + this.pluginWindow.IsOpen ^= true; + } + + /// + /// Toggle the changelog window. + /// + internal void ToggleChangelog() + { + this.changelogWindow.IsOpen ^= true; + } + + /// + /// Toggle the settings window. + /// + internal void ToggleSettings() + { + this.settingsWindow.IsOpen ^= true; + } + + /// + /// Toggle the log window. + /// + internal void ToggleLog() + { + this.logWindow.IsOpen ^= true; + } + + /// + /// Toggle the data window. + /// + internal void ToggleData() + { + this.dataWindow.IsOpen ^= true; + } + + /// + /// Toggle the credits window. + /// + internal void ToggleCredits() + { + this.creditsWindow.IsOpen ^= true; + } + + /// + /// Toggle the stats window. + /// + internal void TogglePluginStats() + { + this.pluginStatWindow.IsOpen ^= true; + } + + /// + /// Toggle the component test window. + /// + internal void ToggleComponentDemo() { this.componentDemoWindow.IsOpen ^= true; }