Cursor
Mouse cursor operations
Operations
CaptureMouse
Capture the mouse and to track input outside an SDL window
function : CaptureMouse(enabled:Bool) ~ Int
Parameters
Name | Type | Description |
---|---|---|
enabled | Bool | true to enable capturing, false to disable. |
Return
Type | Description |
---|---|
Int | 0 on success or -1 if not supported |
GetGlobalMouseState
Retrieve the current global state of the mouse
function : GetGlobalMouseState(x:IntRef, y:IntRef) ~ Int
Parameters
Name | Type | Description |
---|---|---|
x | IntRef | coordinate of the mouse cursor position relative to the focus window |
y | IntRef | coordinate of the mouse cursor position relative to the focus window |
Return
Type | Description |
---|---|
Int | current button state as a bitmask |
GetGlobalMouseState
Retrieve the current global state of the mouse
function : GetGlobalMouseState(p:Point) ~ Int
Parameters
Name | Type | Description |
---|---|---|
p | Point | x and y coordinates of the mouse cursor position relative to the focus window |
Return
Type | Description |
---|---|
Int | current button state as a bitmask |
GetMouseState
Retrieve the current state of the mouse
function : GetMouseState(x:IntRef, y:IntRef) ~ Int
Parameters
Name | Type | Description |
---|---|---|
x | IntRef | coordinate of the mouse cursor position relative to the focus window |
y | IntRef | coordinate of the mouse cursor position relative to the focus window |
Return
Type | Description |
---|---|
Int | current button state as a bitmask |