From c030babdd340b62d32b02d725edf4fe4d6d15e32 Mon Sep 17 00:00:00 2001 From: Asriel Camora Date: Sat, 22 Jun 2024 16:25:09 -0700 Subject: [PATCH] Minor UI fixes --- Craftimizer/Windows/MacroEditor.cs | 7 ------ Craftimizer/Windows/RecipeNote.cs | 6 ++++++ Craftimizer/Windows/Settings.cs | 34 ++++++++++++++++-------------- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/Craftimizer/Windows/MacroEditor.cs b/Craftimizer/Windows/MacroEditor.cs index ca6b2df..158e408 100644 --- a/Craftimizer/Windows/MacroEditor.cs +++ b/Craftimizer/Windows/MacroEditor.cs @@ -1242,9 +1242,6 @@ public sealed class MacroEditor : Window, IDisposable { using var _disabled = ImRaii.Disabled(); ImGui.Button("Stopping", new(halfWidth, height)); - if (ImGui.IsItemHovered()) - ImGuiUtils.Tooltip("This might could a while, sorry! Please report " + - "if this takes longer than a second."); } else { @@ -1256,10 +1253,6 @@ public sealed class MacroEditor : Window, IDisposable { if (ImGui.Button(SolverStartStepCount.HasValue ? "Regenerate" : "Generate", new(halfWidth, height))) CalculateBestMacro(); - if (ImGui.IsItemHovered()) - ImGuiUtils.Tooltip("Suggest a way to finish the crafting recipe. " + - "Results aren't perfect, and levels of success " + - "can vary wildly depending on the solver's settings."); } ImGui.SameLine(); if (ImGuiUtils.IconButtonSquare(FontAwesomeIcon.Paste)) diff --git a/Craftimizer/Windows/RecipeNote.cs b/Craftimizer/Windows/RecipeNote.cs index 966aa36..581f30f 100644 --- a/Craftimizer/Windows/RecipeNote.cs +++ b/Craftimizer/Windows/RecipeNote.cs @@ -801,6 +801,10 @@ public sealed unsafe class RecipeNote : Window, IDisposable ImGuiUtils.AlignMiddle(size, availSize); if (ImGui.Button("Generate")) CalculateSuggestedMacro(); + if (ImGui.IsItemHovered()) + ImGuiUtils.TooltipWrapped("Suggest a way to finish the crafting recipe. " + + "Results aren't perfect, and levels of success " + + "can vary wildly depending on the solver's settings."); ImGui.SetCursorPos(c + new Vector2(0, availSize.Y + ImGui.GetStyle().ItemSpacing.Y)); break; } @@ -813,6 +817,8 @@ public sealed unsafe class RecipeNote : Window, IDisposable ImGuiUtils.AlignMiddle(size, availSize); if (ImGui.Button("Search Online")) CalculateCommunityMacro(); + if (ImGui.IsItemHovered()) + ImGuiUtils.TooltipWrapped("Searches FFXIV Teamcraft to find you the best macro"); ImGui.SetCursorPos(c + new Vector2(0, availSize.Y + ImGui.GetStyle().ItemSpacing.Y)); break; } diff --git a/Craftimizer/Windows/Settings.cs b/Craftimizer/Windows/Settings.cs index 4080e3b..bd66f2e 100644 --- a/Craftimizer/Windows/Settings.cs +++ b/Craftimizer/Windows/Settings.cs @@ -272,10 +272,9 @@ public sealed class Settings : Window, IDisposable } DrawOption( - "Use Macro Chain's /nextmacro", + "Use Macro Chain", "Replaces the last step with /nextmacro to run the next macro " + - "automatically. Overrides Add End Notification except for the " + - "last macro.", + "automatically. Overrides the Intermediate Notification Sound.", Config.MacroCopy.UseNextMacro, v => Config.MacroCopy.UseNextMacro = v, ref isDirty @@ -337,19 +336,22 @@ public sealed class Settings : Window, IDisposable if (Config.MacroCopy.AddNotificationSound) { - DrawOption( - "Intermediate Notification Sound", - "Ending notification sound for an intermediary macro.\n" + - "Uses ", - Config.MacroCopy.IntermediateNotificationSound, - 1, 16, - v => - { - Config.MacroCopy.IntermediateNotificationSound = v; - UIModule.PlayChatSoundEffect((uint)v); - }, - ref isDirty - ); + using (var d = ImRaii.Disabled(Config.MacroCopy.UseNextMacro)) + { + DrawOption( + "Intermediate Notification Sound", + "Ending notification sound for an intermediary macro.\n" + + "Uses ", + Config.MacroCopy.IntermediateNotificationSound, + 1, 16, + v => + { + Config.MacroCopy.IntermediateNotificationSound = v; + UIModule.PlayChatSoundEffect((uint)v); + }, + ref isDirty + ); + } DrawOption( "Final Notification Sound",