Vector2 CursorPosition { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The CursorPosition property provides the current position of the cursor in screen space. This is a static property of the Gizmo class, meaning it can be accessed without instantiating the class. The position is represented as a Vector2, which includes the X and Y coordinates on the screen.

Usage

To access the current cursor position in your application, you can use the Gizmo.CursorPosition property. This can be useful for implementing custom UI elements or for handling input in a game or application.

Example

// Example of accessing the cursor position
Vector2 cursorPos = Gizmo.CursorPosition;

// Use the cursor position for custom logic
if (cursorPos.x > 100 && cursorPos.y > 100)
{
    // Perform some action if the cursor is in a specific area
}