diff --git a/MenuAPI/MenuController.cs b/MenuAPI/MenuController.cs index 6dc5d1a..8b99d7d 100644 --- a/MenuAPI/MenuController.cs +++ b/MenuAPI/MenuController.cs @@ -30,6 +30,7 @@ public class MenuController : BaseScript public static bool PreventExitingMenu { get; set; } = false; public static bool DisableBackButton { get; set; } = false; public static Control MenuToggleKey { get; set; } = Control.InteractionMenu; + public static bool EnableMenuToggleKeyOnController { get; set; } = true; internal static Dictionary MenuButtons { get; private set; } = new Dictionary(); @@ -328,6 +329,9 @@ private async Task ProcessToggleMenuButton() { if (Game.CurrentInputMode == InputMode.GamePad) { + if (!EnableMenuToggleKeyOnController) + return; + int tmpTimer = GetGameTimer(); while ((Game.IsControlPressed(0, Control.InteractionMenu) || Game.IsDisabledControlPressed(0, Control.InteractionMenu)) && !Game.IsPaused && IsScreenFadedIn() && !Game.Player.IsDead && !IsPlayerSwitchInProgress() && !DontOpenAnyMenu) {