using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; #if MODULE_INPUT_SYSTEM using UnityEngine.InputSystem; #endif namespace Watermelon { [RequireComponent(typeof(Button))] public class UIGamepadButton : MonoBehaviour { [SerializeField] GamepadButtonType buttonType; public GamepadButtonType ButtonType => buttonType; [SerializeField] UIGamepadButtonTag buttonTag; [Space] [SerializeField] UIGamepadButtonTag buttonsToDisable; [SerializeField] UIGamepadButtonTag buttonsToEnable; [Space] // Helps to manualy controll if the button is active even if it's tag is active [SerializeField] bool isInFocus = true; public bool IsInFocus { get => isInFocus; private set => isInFocus = value; } [Space] [SerializeField] Image gamepadButtonIcon; private Button button; private static UIGamepadButtonTag ActiveButtonTags { get; set; } = UIGamepadButtonTag.MainMenu; private void Awake() { button = GetComponent