From 31e2002696af0696762047361dd50bc7e9a38969 Mon Sep 17 00:00:00 2001 From: Anna Clemens Date: Thu, 9 Dec 2021 01:19:31 -0500 Subject: [PATCH] style: fix spacing --- Glamaholic/Ui/Helpers/ExamineHelper.cs | 1 + Glamaholic/Ui/Helpers/HelperUtil.cs | 8 +++++--- Glamaholic/Ui/MainInterface.cs | 2 +- Glamaholic/Util.cs | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Glamaholic/Ui/Helpers/ExamineHelper.cs b/Glamaholic/Ui/Helpers/ExamineHelper.cs index 9d50146..b7ed49d 100755 --- a/Glamaholic/Ui/Helpers/ExamineHelper.cs +++ b/Glamaholic/Ui/Helpers/ExamineHelper.cs @@ -34,6 +34,7 @@ namespace Glamaholic.Ui.Helpers { if (ImGui.IsWindowAppearing()) { this._nameInput = this.Ui.Plugin.Functions.ExamineName ?? "Copied glamour"; } + HelperUtil.DrawCreatePlateMenu(this.Ui, GetItems, ref this._nameInput); if (ImGui.Selectable("Try on")) { diff --git a/Glamaholic/Ui/Helpers/HelperUtil.cs b/Glamaholic/Ui/Helpers/HelperUtil.cs index 147f982..b29549b 100755 --- a/Glamaholic/Ui/Helpers/HelperUtil.cs +++ b/Glamaholic/Ui/Helpers/HelperUtil.cs @@ -93,7 +93,7 @@ namespace Glamaholic.Ui.Helpers { internal static bool DrawCreatePlateMenu(PluginUi ui, Func?> getter, ref string nameInput) { var ret = false; - + if (!ImGui.BeginMenu("Create glamour plate")) { return ret; } @@ -107,6 +107,7 @@ namespace Glamaholic.Ui.Helpers { ret = true; } } + ImGui.PopTextWrapPos(); if (ImGui.IsWindowAppearing()) { @@ -136,7 +137,7 @@ namespace Glamaholic.Ui.Helpers { ImGui.EndChild(); } - + ImGui.EndMenu(); return ret; @@ -148,12 +149,13 @@ namespace Glamaholic.Ui.Helpers { }; Configuration.SanitisePlate(plate); - + if (idx == -1) { ui.Plugin.Config.AddPlate(plate); } else { ui.Plugin.Config.Plates[idx] = plate; } + ui.Plugin.SaveConfig(); ui.OpenMainInterface(); ui.SwitchPlate(idx == -1 ? ui.Plugin.Config.Plates.Count - 1 : idx, true); diff --git a/Glamaholic/Ui/MainInterface.cs b/Glamaholic/Ui/MainInterface.cs index 149091d..6693ffe 100755 --- a/Glamaholic/Ui/MainInterface.cs +++ b/Glamaholic/Ui/MainInterface.cs @@ -251,7 +251,7 @@ namespace Glamaholic.Ui { if (string.IsNullOrWhiteSpace(name)) { continue; } - + var item = this.Items.Find(item => item.Name == name); if (item == null) { continue; diff --git a/Glamaholic/Util.cs b/Glamaholic/Util.cs index b306a98..917911d 100755 --- a/Glamaholic/Util.cs +++ b/Glamaholic/Util.cs @@ -119,7 +119,7 @@ namespace Glamaholic { if (category.FingerL > 0) { return PlateSlot.LeftRing; } - + return null; }