using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; using System; namespace BriarQueen.UI.Menus.Components { [RequireComponent(typeof(Button))] public class UnderlineButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler, ISelectHandler, IDeselectHandler { [Header("References")] [SerializeField] protected TextMeshProUGUI _label; [SerializeField] protected TextMeshProUGUI _contextLabel; [SerializeField] protected string _contextText; protected Button _button; protected UnderlineButtonGroup _group; protected bool _isHovered; public event Action SelectionRequested; public event Action HoverEntered; public event Action HoverExited; public bool IsSelected { get; private set; } // True when this button is registered with a group public bool IsGrouped => _group != null; protected virtual void Awake() { _button = GetComponent