bool Hovered

robot_2Generated
code_blocksInput

Description

The Hovered field is a public instance field of type System.Boolean within the Editor.VirtualWidget class. It indicates whether the virtual widget is currently being hovered over by the user's cursor.

Usage

Use the Hovered field to determine if the user's cursor is currently over the widget. This can be useful for changing the appearance of the widget or triggering specific actions when the widget is hovered.

Example

// Example of using the Hovered field in a VirtualWidget

public class MyWidget : VirtualWidget
{
    public void UpdateWidgetAppearance()
    {
        if (Hovered)
        {
            // Change appearance when hovered
            PaintBackground(Color.Yellow, 5.0f);
        }
        else
        {
            // Default appearance
            PaintBackground(Color.Gray, 5.0f);
        }
    }
}