diff --git a/Questionable/Configuration.cs b/Questionable/Configuration.cs index 4b2769614..4424db236 100644 --- a/Questionable/Configuration.cs +++ b/Questionable/Configuration.cs @@ -18,6 +18,7 @@ internal sealed class Configuration : IPluginConfiguration public uint MountId { get; set; } = 71; public GrandCompany GrandCompany { get; set; } = GrandCompany.None; public bool HideInAllInstances { get; set; } = true; + public bool UseEscToCancelQuesting { get; set; } = true; } internal sealed class AdvancedConfiguration diff --git a/Questionable/Controller/QuestController.cs b/Questionable/Controller/QuestController.cs index 4838353aa..c92fee2ba 100644 --- a/Questionable/Controller/QuestController.cs +++ b/Questionable/Controller/QuestController.cs @@ -140,7 +140,7 @@ internal sealed class QuestController _combatController.Stop("HP = 0"); } } - else if (_keyState[VirtualKey.ESCAPE]) + else if (_configuration.General.UseEscToCancelQuesting && _keyState[VirtualKey.ESCAPE]) { if (_currentTask != null || _taskQueue.Count > 0) { diff --git a/Questionable/Windows/ConfigWindow.cs b/Questionable/Windows/ConfigWindow.cs index 11693300e..0fa60d69c 100644 --- a/Questionable/Windows/ConfigWindow.cs +++ b/Questionable/Windows/ConfigWindow.cs @@ -76,6 +76,13 @@ internal sealed class ConfigWindow : LWindow, IPersistableWindowConfig Save(); } + bool useEscToCancelQuesting = _configuration.General.UseEscToCancelQuesting; + if (ImGui.Checkbox("Use ESC to cancel questing/movement", ref useEscToCancelQuesting)) + { + _configuration.General.UseEscToCancelQuesting = useEscToCancelQuesting; + Save(); + } + ImGui.EndTabItem(); }