|
@@ -16,6 +16,8 @@ namespace KairoEngine.UI.Tooltips
|
|
|
public string content;
|
|
|
public string tooltipType = "";
|
|
|
private bool visible = false;
|
|
|
+
|
|
|
+
|
|
|
public void OnPointerEnter(PointerEventData eventData)
|
|
|
{
|
|
|
if(MouseInputUIBlocker.BlockedByUI) return;
|
|
@@ -29,13 +31,6 @@ namespace KairoEngine.UI.Tooltips
|
|
|
|
|
|
}
|
|
|
|
|
|
- public void OnPointerExit(PointerEventData eventData)
|
|
|
- {
|
|
|
- if(delay != null) LeanTween.cancel(delay.uniqueId);
|
|
|
- TooltipSystem.Hide();
|
|
|
- visible = false;
|
|
|
- }
|
|
|
-
|
|
|
public void OnMouseEnter()
|
|
|
{
|
|
|
if(MouseInputUIBlocker.BlockedByUI) return;
|
|
@@ -49,7 +44,12 @@ namespace KairoEngine.UI.Tooltips
|
|
|
|
|
|
}
|
|
|
|
|
|
- public void OnMouseExit()
|
|
|
+ public void OnPointerExit(PointerEventData eventData) => DisableTooltip();
|
|
|
+ public void OnMouseExit() => DisableTooltip();
|
|
|
+ private void OnDisable() => DisableTooltip();
|
|
|
+ private void OnDestroy() => DisableTooltip();
|
|
|
+
|
|
|
+ public void DisableTooltip()
|
|
|
{
|
|
|
if(delay != null) LeanTween.cancel(delay.uniqueId);
|
|
|
TooltipSystem.Hide();
|