Search Results for

    Show / Hide Table of Contents

    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
    Syntax
    public class TooltipHandler : MonoBehaviour

    Fields

    | Edit this page View Source

    childTransform

    Declaration
    public RectTransform childTransform
    Field Value
    Type Description
    RectTransform
    | Edit this page View Source

    instance

    Declaration
    private static TooltipHandler instance
    Field Value
    Type Description
    TooltipHandler
    | Edit this page View Source

    isEnabled

    Declaration
    private bool isEnabled
    Field Value
    Type Description
    bool
    | Edit this page View Source

    lastMousePosition

    Declaration
    private Vector2 lastMousePosition
    Field Value
    Type Description
    Vector2
    | Edit this page View Source

    lastTimestamp

    Declaration
    private float lastTimestamp
    Field Value
    Type Description
    float
    | Edit this page View Source

    mouseDeltaThreshold

    Declaration
    private readonly float mouseDeltaThreshold
    Field Value
    Type Description
    float
    | Edit this page View Source

    textObj

    Declaration
    public TextMeshProUGUI textObj
    Field Value
    Type Description
    TextMeshProUGUI
    | Edit this page View Source

    tooltipDelay

    Declaration
    public float tooltipDelay
    Field Value
    Type Description
    float
    | Edit this page View Source

    waitForDisplay

    Declaration
    private bool waitForDisplay
    Field Value
    Type Description
    bool

    Properties

    | Edit this page View Source

    Enabled

    Whether the tooltip system should be enabled.

    Declaration
    public bool Enabled { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Instance

    The singleton tooltip instance.

    Declaration
    public static TooltipHandler Instance { get; }
    Property Value
    Type Description
    TooltipHandler

    Methods

    | Edit this page View Source

    Awake()

    Declaration
    private void Awake()
    | Edit this page View Source

    ChangeMessage(string)

    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

    Close()

    Hides the tooltip until the next call to Open(string).

    Declaration
    public void Close()
    | Edit this page View Source

    Open(string)

    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

    SetEnabled(bool)

    Declaration
    private void SetEnabled(bool newEnabled)
    Parameters
    Type Name Description
    bool newEnabled
    | Edit this page View Source

    Start()

    Declaration
    private void Start()
    | Edit this page View Source

    Update()

    Declaration
    private void Update()
    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX