Skip to content

CursorMode

1 min read

Import: import system.window;

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

CursorMode

How the mouse cursor behaves over a window.

public enum CursorMode

Normal

The cursor is visible and moves freely.

Normal = 0

Hidden

The cursor is invisible while it is over the window but is not confined.

Hidden = 1

Captured

The cursor is hidden and locked to the window, for first-person camera controls. MouseState.delta keeps reporting movement without limit. Browsers only grant the lock after a user gesture, such as a click on the canvas.

Captured = 2