diff --git a/RotationSolver/UI/ImGuiHelper.cs b/RotationSolver/UI/ImGuiHelper.cs index b6b4d0cea..f871f76b6 100644 --- a/RotationSolver/UI/ImGuiHelper.cs +++ b/RotationSolver/UI/ImGuiHelper.cs @@ -70,14 +70,14 @@ public static void DisplayMacro(this MacroInfo info) // Display a draggable integer input for the macro index if (ImGui.DragInt($"{UiString.ConfigWindow_Events_MacroIndex.GetDescription()}##MacroIndex{info.GetHashCode()}", ref info.MacroIndex, 1, -1, 99)) { - SaveConfig(); + Service.Config.Save(); } // Display a checkbox for the shared macro option ImGui.SameLine(); if (ImGui.Checkbox($"{UiString.ConfigWindow_Events_ShareMacro.GetDescription()}##ShareMacro{info.GetHashCode()}", ref info.IsShared)) { - SaveConfig(); + Service.Config.Save(); } } @@ -87,7 +87,7 @@ public static void DisplayEvent(this ActionEventInfo info) if (ImGui.InputText($"{UiString.ConfigWindow_Events_ActionName.GetDescription()}##ActionName{info.GetHashCode()}", ref name, 100)) { info.Name = name; - SaveConfig(); + Service.Config.Save(); } info.DisplayMacro(); @@ -527,7 +527,7 @@ public static bool IsInRect(Vector2 leftTop, Vector2 size) ConfigUnitType.Degree => " °", ConfigUnitType.Pixels => " p", ConfigUnitType.Yalms => " y", - ConfigUnitType.Percent => " %", + ConfigUnitType.Percent => " %%", _ => string.Empty, }; @@ -552,16 +552,4 @@ public static void Draw(this CombatType type) ImGui.TextColored(ImGuiColors.DalamudRed, " None of PvE or PvP!"); } } - - private static void SaveConfig() - { - try - { - Service.Config.Save(); - } - catch (Exception ex) - { - Svc.Log.Warning(ex, "Failed to save configuration."); - } - } } \ No newline at end of file