From 6610d55f17212c27fb88160566e8ef5539783644 Mon Sep 17 00:00:00 2001 From: ms2mml <> Date: Sat, 12 Sep 2020 15:10:32 -0700 Subject: [PATCH] Switch default behavior for /xlplugins to toggle --- Dalamud/Dalamud.cs | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/Dalamud/Dalamud.cs b/Dalamud/Dalamud.cs index 27b74f044..108304013 100644 --- a/Dalamud/Dalamud.cs +++ b/Dalamud/Dalamud.cs @@ -469,20 +469,13 @@ namespace Dalamud { this.isImguiDrawChangelogWindow = this.changelogWindow != null && this.changelogWindow.Draw(); } } - internal void OpenPluginInstaller(bool toggle = false) { - if (!toggle) + internal void OpenPluginInstaller() + { + if (this.pluginWindow == null) { this.pluginWindow = new PluginInstallerWindow(this, this.StartInfo.GameVersion); - this.isImguiDrawPluginWindow = true; - } - else - { - if (this.pluginWindow == null) - { - this.pluginWindow = new PluginInstallerWindow(this, this.StartInfo.GameVersion); - } - this.isImguiDrawPluginWindow ^= true; } + this.isImguiDrawPluginWindow ^= true; } internal void OpenChangelog() { @@ -728,15 +721,9 @@ namespace Dalamud { Log.Information(info); } - private void OnOpenInstallerCommand(string command, string arguments) { - if (arguments == "toggle" || arguments == "t") - { - OpenPluginInstaller(toggle: true); - } - else - { - OpenPluginInstaller(); - } + private void OnOpenInstallerCommand(string command, string arguments) + { + OpenPluginInstaller(); } private void OnOpenCreditsCommand(string command, string arguments)