diff --git a/RotationSolver/Commands/RSCommands_Actions.cs b/RotationSolver/Commands/RSCommands_Actions.cs index 39028d556..2e90c0972 100644 --- a/RotationSolver/Commands/RSCommands_Actions.cs +++ b/RotationSolver/Commands/RSCommands_Actions.cs @@ -5,6 +5,7 @@ using ECommons.GameHelpers; using RotationSolver.Helpers; using RotationSolver.Localization; +using RotationSolver.UI; using RotationSolver.Updaters; namespace RotationSolver.Commands @@ -56,11 +57,9 @@ public static void DoAction() if (wrong) { - Svc.Toasts.ShowQuest(" " + LocalizationManager.RightLang.ClickingMistakeMessage, - new Dalamud.Game.Gui.Toast.QuestToastOptions() - { - IconId = nextAction.IconID, - }); + Svc.Toasts.ShowError(LocalizationManager.RightLang.ClickingMistakeMessage); + ControlWindow.Wrong = nextAction; + ControlWindow.DidTime = DateTime.Now; } #if DEBUG diff --git a/RotationSolver/Localization/Localization.json b/RotationSolver/Localization/Localization.json index a237730b9..bae3e1785 100644 --- a/RotationSolver/Localization/Localization.json +++ b/RotationSolver/Localization/Localization.json @@ -76,6 +76,7 @@ "ConfigWindow_Param_NotInCombatDelay": "Set the range of random delay for Not In Combat in second.", "ConfigWindow_Param_ClickingDelay": "Set the range of random delay for the interval of clicking actions.", "ConfigWindow_Param_StopCastingDelay": "Set the range of random delay for stopping casting when target is no need to cast in second.", + "ConfigWindow_Param_ClickMistake": "How likely is it that RS will click the wrong action.", "ConfigWindow_Param_Display": "Display", "ConfigWindow_Param_Advanced": "Advanced", "ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or has TenChiJin or PhantomFlurry status.", @@ -177,7 +178,7 @@ "ConfigWindow_Param_HostileDesc": "You can set the logic of hostile target selection to allow flexibility in switching the logic of selecting hostile in battle.", "ConfigWindow_Param_AddOne": "Add One", "ConfigWindow_Param_HostileCondition": "Hostile target selection condition", - "ConfigWindow_Param_ResetToDefault": "Press left ctrl + shift and press right mouse button to reset this value", + "ConfigWindow_Param_ResetToDefault": "Press left ctrl and press left mouse button to reset this value", "ConfigWindow_Action_ShowOnCDWindow": "Show on CD window", "ConfigWindow_Control_OnlyShowWithHostileOrInDuty": "Only shown if there are enemies in or in duty", "ConfigWindow_Control_ShowNextActionWindow": "Show Next Action Window", @@ -427,5 +428,6 @@ "HighEndWarning": "Please separately keybind damage reduction / shield cooldowns in case RS fails at a crucial moment in {0}!", "HighEndBan": "{0} can not be used in High-end Duty!", "TextToTalkWarning": "You didn't install TextToTalk, please install it to make Rotation Solver say something for you!", - "WhiteListDownloadingFailed": "Failed to load white List. Click to retry." + "WhiteListDownloadingFailed": "Failed to load white List. Click to retry.", + "ClickingMistakeMessage": "OOOps! RS clicked the wrong action!" } \ No newline at end of file diff --git a/RotationSolver/UI/ControlWindow.cs b/RotationSolver/UI/ControlWindow.cs index 5079a6796..40a42a8bc 100644 --- a/RotationSolver/UI/ControlWindow.cs +++ b/RotationSolver/UI/ControlWindow.cs @@ -6,7 +6,6 @@ using RotationSolver.Commands; using RotationSolver.Localization; using RotationSolver.Updaters; -using static System.Net.Mime.MediaTypeNames; namespace RotationSolver.UI; @@ -18,6 +17,9 @@ internal class ControlWindow : Window | ImGuiWindowFlags.NoNav | ImGuiWindowFlags.NoScrollWithMouse; + public static IAction Wrong { get; set; } + public static DateTime DidTime { get; set; } + public ControlWindow() : base(nameof(ControlWindow), BaseFlags) { @@ -181,6 +183,12 @@ private static void DrawSpecials() ImGui.Text("Auto: " + DataCenter.AutoStatus.ToString()); ImGui.EndGroup(); + + ImGui.SameLine(); + + ImGui.Text(" Mistake:"); + ImGui.SameLine(); + DrawIAction(DateTime.Now - DidTime < TimeSpan.FromSeconds(5) ? Wrong : null, Service.Config.ControlWindow0GCDSize, 1); } static void DrawCommandAction(IAction gcd, IAction ability, SpecialCommandType command, Vector4 color)