TextureCombiner/Assets/Scripts/UI/HoverInfo.cs
max 1165a4e4a8 Init.
P4 -> GitHub sync.
2020-11-01 03:54:32 +01:00

21 lines
484 B
C#

using UnityEngine;
using UnityEngine.EventSystems;
namespace TextureCombiner
{
public class HoverInfo : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
[SerializeField, Multiline]
private string m_text = "";
public void OnPointerEnter(PointerEventData eventData)
{
HoverInfoBox.s_hoverInfoBox.Show(m_text, eventData.position);
}
public void OnPointerExit(PointerEventData eventData)
{
HoverInfoBox.s_hoverInfoBox.Hide();
}
}
}