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
object
TooltipHandler
Namespace: AS2.UI
Assembly: .dll
public class TooltipHandler : MonoBehaviour
Fields
|
Edit this page
View Source
Declaration
public RectTransform childTransform
Field Value
Type |
Description |
RectTransform |
|
|
Edit this page
View Source
Declaration
private static TooltipHandler instance
Field Value
|
Edit this page
View Source
Declaration
Field Value
|
Edit this page
View Source
Declaration
private Vector2 lastMousePosition
Field Value
|
Edit this page
View Source
Declaration
private float lastTimestamp
Field Value
|
Edit this page
View Source
Declaration
private readonly float mouseDeltaThreshold
Field Value
|
Edit this page
View Source
textObj
Declaration
public TextMeshProUGUI textObj
Field Value
Type |
Description |
TextMeshProUGUI |
|
|
Edit this page
View Source
Declaration
public float tooltipDelay
Field Value
|
Edit this page
View Source
Declaration
private bool waitForDisplay
Field Value
Properties
|
Edit this page
View Source
Whether the tooltip system should be enabled.
Declaration
public bool Enabled { get; set; }
Property Value
|
Edit this page
View Source
The singleton tooltip instance.
Declaration
public static TooltipHandler Instance { get; }
Property Value
Methods
|
Edit this page
View Source
Declaration
|
Edit this page
View Source
Changes the tooltip message while it is
displayed.
Declaration
public void ChangeMessage(string message)
Parameters
Type |
Name |
Description |
string |
message |
The new tooltip message.
|
|
Edit this page
View Source
Declaration
|
Edit this page
View Source
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.
|
|
Edit this page
View Source
Declaration
private void SetEnabled(bool newEnabled)
Parameters
Type |
Name |
Description |
bool |
newEnabled |
|
|
Edit this page
View Source
Declaration
|
Edit this page
View Source
Declaration