bool IsHovered { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The IsHovered property is a static boolean property of the Gizmo class in the Sandbox namespace. It indicates whether the current gizmo is being hovered over by the mouse cursor. This property is useful for determining if a gizmo is currently under the mouse pointer, which can be used to trigger specific interactions or visual feedback.

Usage

Use the IsHovered property to check if a gizmo is currently being hovered over by the mouse. This can be particularly useful in scenarios where you want to provide visual feedback or initiate actions when the user hovers over a gizmo.

Since IsHovered is a static property, it can be accessed directly through the Gizmo class without needing to instantiate an object.

Example

// Example of using the IsHovered property
if (Gizmo.IsHovered)
{
    // Perform actions when the gizmo is hovered
    // For example, change the color of the gizmo
    Gizmo.Draw.Color = Color.Red;
}