Class TooltipHandler
The main behavior script for the tooltip system.
This class manages the visibility of the tooltip text box
and provides the interface for requesting a tooltip and
closing the box again.
Inheritance
TooltipHandler
Namespace: AS2.UI
Assembly: .dll
public class TooltipHandler : MonoBehaviour
Fields
Declaration
public RectTransform childTransform
Field Value
Type |
Description |
RectTransform |
|
Declaration
private static TooltipHandler instance
Field Value
Declaration
Field Value
Declaration
private Vector2 lastMousePosition
Field Value
Declaration
private float lastTimestamp
Field Value
Declaration
private readonly float mouseDeltaThreshold
Field Value
textObj
Declaration
public TextMeshProUGUI textObj
Field Value
Type |
Description |
TextMeshProUGUI |
|
Declaration
public float tooltipDelay
Field Value
Declaration
private bool waitForDisplay
Field Value
Properties
Whether the tooltip system should be enabled.
Declaration
public bool Enabled { get; set; }
Property Value
The singleton tooltip instance.
Declaration
public static TooltipHandler Instance { get; }
Property Value
Methods
Declaration
Changes the tooltip message while it is
displayed.
Declaration
public void ChangeMessage(string message)
Parameters
Type |
Name |
Description |
string |
message |
The new tooltip message.
|
Declaration
Schedules the tooltip to be displayed with the given message.
Should be called when the cursor enters the UI element.
Declaration
public void Open(string message)
Parameters
Type |
Name |
Description |
string |
message |
The new tooltip message.
|
Declaration
private void SetEnabled(bool newEnabled)
Parameters
Type |
Name |
Description |
bool |
newEnabled |
|
Declaration
Declaration