Cursor provides processed input values for detecting the cursor position, pushes, and clicks. Cursor is used internally by Gum to perform operations such as clicking on buttons or dragging sliders.
Most runtimes create a Cursor internally. The cursor can be accessed using FormsUtilities.
WindowOver returns the current InteractiveGue that the Cursor is hovering over. This returns the visual that the user is over when using Forms controls.
A runtime instance is eligible for being the Cursor's WindowOver if its HasEvents variable is set to true, and if either of the following are true:
It is an instance of a Component
It is an instance of a Standard Element, but it has any cursor-related events assigned such as Push or Click.
For example, a Sprite may be considered WindowOver if it has a Click event assigned.
The WindowOver property can be used to detect if clicks should be consumed or passed down to your game. For example, you may have a HUD which displays buttons. If the user Cursor is over the HUD then the game should not process input.
The following code shows how to check if the user is over Gum UI.