Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: changed mistake showing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jul 6, 2023
1 parent 6b27aa6 commit 8950151
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
9 changes: 4 additions & 5 deletions RotationSolver/Commands/RSCommands_Actions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using ECommons.GameHelpers;
using RotationSolver.Helpers;
using RotationSolver.Localization;
using RotationSolver.UI;
using RotationSolver.Updaters;

namespace RotationSolver.Commands
Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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!"
}
10 changes: 9 additions & 1 deletion RotationSolver/UI/ControlWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using RotationSolver.Commands;
using RotationSolver.Localization;
using RotationSolver.Updaters;
using static System.Net.Mime.MediaTypeNames;

namespace RotationSolver.UI;

Expand All @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8950151

Please sign in to comment.