1
0
forked from liza/Questionable

Add an option to disable ESC

This commit is contained in:
Liza 2024-08-01 18:47:13 +02:00
parent 035b7383ae
commit 3ff529b99a
Signed by: liza
GPG Key ID: 7199F8D727D55F67
3 changed files with 9 additions and 1 deletions

View File

@ -18,6 +18,7 @@ internal sealed class Configuration : IPluginConfiguration
public uint MountId { get; set; } = 71; public uint MountId { get; set; } = 71;
public GrandCompany GrandCompany { get; set; } = GrandCompany.None; public GrandCompany GrandCompany { get; set; } = GrandCompany.None;
public bool HideInAllInstances { get; set; } = true; public bool HideInAllInstances { get; set; } = true;
public bool UseEscToCancelQuesting { get; set; } = true;
} }
internal sealed class AdvancedConfiguration internal sealed class AdvancedConfiguration

View File

@ -140,7 +140,7 @@ internal sealed class QuestController
_combatController.Stop("HP = 0"); _combatController.Stop("HP = 0");
} }
} }
else if (_keyState[VirtualKey.ESCAPE]) else if (_configuration.General.UseEscToCancelQuesting && _keyState[VirtualKey.ESCAPE])
{ {
if (_currentTask != null || _taskQueue.Count > 0) if (_currentTask != null || _taskQueue.Count > 0)
{ {

View File

@ -76,6 +76,13 @@ internal sealed class ConfigWindow : LWindow, IPersistableWindowConfig
Save(); Save();
} }
bool useEscToCancelQuesting = _configuration.General.UseEscToCancelQuesting;
if (ImGui.Checkbox("Use ESC to cancel questing/movement", ref useEscToCancelQuesting))
{
_configuration.General.UseEscToCancelQuesting = useEscToCancelQuesting;
Save();
}
ImGui.EndTabItem(); ImGui.EndTabItem();
} }