mirror of
https://github.com/maxartz15/TextureCombiner.git
synced 2024-09-20 05:05:48 +02:00
21 lines
484 B
C#
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();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|