Files
CourierOld/Game/CourierOld/Assets/Code/UI/Panels/Etc/HoverButton.cs
T

16 lines
530 B
C#

using System;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace Code.UI.Panels.Etc
{
public class HoverButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
public Button button;
public Action OnPointerEnterEvent, OnPointerExitEvent;
public virtual void OnPointerEnter(PointerEventData eventData) => OnPointerEnterEvent?.Invoke();
public virtual void OnPointerExit(PointerEventData eventData) => OnPointerExitEvent?.Invoke();
}
}