From 1eedc4660be366b1320ba21a734a95daccbbff66 Mon Sep 17 00:00:00 2001 From: Aireil <33433913+Aireil@users.noreply.github.com> Date: Wed, 9 Dec 2020 15:02:37 +0100 Subject: [PATCH] Fix new line if no disable button --- Dalamud/Plugin/PluginInstallerWindow.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Dalamud/Plugin/PluginInstallerWindow.cs b/Dalamud/Plugin/PluginInstallerWindow.cs index 2ecb4b441..09d982c6b 100644 --- a/Dalamud/Plugin/PluginInstallerWindow.cs +++ b/Dalamud/Plugin/PluginInstallerWindow.cs @@ -365,14 +365,18 @@ namespace Dalamud.Plugin ImGui.Text($"{command.Key} → {command.Value.HelpMessage}"); } - if (!installedPlugin.IsRaw && ImGui.Button(Loc.Localize("InstallerDisable", "Disable"))) { - try { - this.dalamud.PluginManager.DisablePlugin(installedPlugin.Definition); - } catch (Exception exception) { - Log.Error(exception, "Could not disable plugin."); - this.errorModalDrawing = true; - this.errorModalOnNextFrame = true; + if (!installedPlugin.IsRaw) { + if (ImGui.Button(Loc.Localize("InstallerDisable", "Disable"))) { + try { + this.dalamud.PluginManager.DisablePlugin(installedPlugin.Definition); + } catch (Exception exception) { + Log.Error(exception, "Could not disable plugin."); + this.errorModalDrawing = true; + this.errorModalOnNextFrame = true; + } } + } else { + ImGui.NewLine(); } if (installedPlugin.PluginInterface.UiBuilder.OnOpenConfigUi != null) { @@ -397,6 +401,7 @@ namespace Dalamud.Plugin ImGui.TextColored(new Vector4(0.5f, 0.5f, 0.5f, 1.0f), $" v{pluginDefinition.AssemblyVersion}"); if(installedPlugin.IsRaw) { + ImGui.SameLine(); ImGui.TextColored(new Vector4(1.0f, 0.0f, 0.0f, 1.0f), "To update or disable this plugin, please remove it from the devPlugins folder."); } }