Restructure settings, improve dialogs

This commit is contained in:
Tyfon
2024-04-29 18:44:47 -07:00
parent 3b8dff8353
commit 06403ac2bb
5 changed files with 223 additions and 26 deletions

View File

@@ -19,6 +19,7 @@ namespace UIFixes
new ConfirmDiscardPatch().Enable();
}
// This patch just caches whether this navigation is a forward navigation, which determines if the preset is actually closing
public class CloseScreenInterruptionPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
@@ -45,12 +46,12 @@ namespace UIFixes
[PatchPrefix]
private static bool Prefix(ref Task<bool> __result)
{
if (MoveForward && Settings.WeaponPresetConfirmOnNavigate.Value)
if (MoveForward && Settings.ShowPresetConfirmations.Value == WeaponPresetConfirmationOption.Always)
{
return true;
}
if (!MoveForward && Settings.WeaponPresetConfirmOnClose.Value)
if (!MoveForward && Settings.ShowPresetConfirmations.Value != WeaponPresetConfirmationOption.Never)
{
return true;
}