Fix new line if no disable button

This commit is contained in:
Aireil 2020-12-09 15:02:37 +01:00
parent a104365b32
commit d756dc0287

View file

@ -365,7 +365,12 @@ namespace Dalamud.Plugin
ImGui.Text($"{command.Key} → {command.Value.HelpMessage}"); ImGui.Text($"{command.Key} → {command.Value.HelpMessage}");
} }
if (!installedPlugin.IsRaw && ImGui.Button(Loc.Localize("InstallerDisable", "Disable"))) { ImGui.NewLine();
if (!installedPlugin.IsRaw) {
ImGui.SameLine();
if (ImGui.Button(Loc.Localize("InstallerDisable", "Disable"))) {
try { try {
this.dalamud.PluginManager.DisablePlugin(installedPlugin.Definition); this.dalamud.PluginManager.DisablePlugin(installedPlugin.Definition);
} catch (Exception exception) { } catch (Exception exception) {
@ -374,6 +379,7 @@ namespace Dalamud.Plugin
this.errorModalOnNextFrame = true; this.errorModalOnNextFrame = true;
} }
} }
}
if (installedPlugin.PluginInterface.UiBuilder.OnOpenConfigUi != null) { if (installedPlugin.PluginInterface.UiBuilder.OnOpenConfigUi != null) {
ImGui.SameLine(); ImGui.SameLine();
@ -397,6 +403,7 @@ namespace Dalamud.Plugin
ImGui.TextColored(new Vector4(0.5f, 0.5f, 0.5f, 1.0f), $" v{pluginDefinition.AssemblyVersion}"); ImGui.TextColored(new Vector4(0.5f, 0.5f, 0.5f, 1.0f), $" v{pluginDefinition.AssemblyVersion}");
if(installedPlugin.IsRaw) { 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."); 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.");
} }
} }