using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; public class MainMenuButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, ISelectHandler, IDeselectHandler, IPointerDownHandler, IPointerUpHandler { [Header("References")] public Image targetGraphic; public RectTransform targetTransform; public bool pointerSelected; public bool keyboardSelected; public bool pressed; [Header("Style")] public Color baseColor; public Color selectedColor; public float baseWidth; public float selectedWidth; public Color tintColor; public void OnPointerEnter(PointerEventData eventData) { pointerSelected = true; } public void OnPointerExit(PointerEventData eventData) { pointerSelected = false; } public void OnSelect(BaseEventData eventData) { keyboardSelected = true; } public void OnDeselect(BaseEventData eventData) { keyboardSelected = false; } public void OnPointerDown(PointerEventData eventData) { pressed = true; } public void OnPointerUp(PointerEventData eventData) { pressed = false; } void Start(){ var b = GetComponent