26 lines
649 B
C#
26 lines
649 B
C#
using DG.Tweening;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
|
|
namespace Code.UI.Panels.Etc
|
|
{
|
|
public class MainMenuButton : HoverButton
|
|
{
|
|
public TMP_Text text;
|
|
|
|
public Color defaultColor;
|
|
public Color hoverColor;
|
|
|
|
public override void OnPointerEnter(PointerEventData eventData)
|
|
{
|
|
text.DOColor(hoverColor, 0.2f);
|
|
OnPointerEnterEvent?.Invoke();
|
|
}
|
|
public override void OnPointerExit(PointerEventData eventData)
|
|
{
|
|
text.DOColor(defaultColor, 0.2f);
|
|
OnPointerExitEvent?.Invoke();
|
|
}
|
|
}
|
|
} |