WindowInput
Summary
Provides window-specific and static global input handling for desktop platforms, including event-based callbacks and polling mechanisms for keyboard, mouse, and window state changes.
Remarks
Danger
All calls made within this class MUST be performed on the Master Thread. See Threads.RunLater on how to safely call this from an asynchronous thread. Failure to comply with this can cause catastrophical failures as the engine is not designed for this.
Definition
Namespace: SDT4.Managed.Input.Desktop
Assembly: SDT4.Managed.Input.dll
sealed class WindowInput
Inheritance:
Object ➔ WindowInput
Implements:
Fields
| Name | Type | Description |
|---|---|---|
Properties
| Name | Type | Description |
|---|---|---|
Methods
public static Boolean IsKeyDown(KeyCode keyInput)
Summary: Queries the native backend to determine whether the specified keyboard key is currently held down.
Parameters:
keyInput(KeyCode): The key code to poll.
Returns:
- Boolean:
if the key is currently down; otherwise, .
public static Boolean IsMouseButtonDown(MouseButton mouseInput)
Summary: Queries the native backend to determine whether the specified mouse button is currently held down.
Parameters:
mouseInput(MouseButton): The mouse button to poll.
Returns:
- Boolean:
if the button is currently down; otherwise, .
public static Vector2i GetMousePosition()
Summary: Retrieves the current screen/window coordinate of the mouse cursor from the native backend.
Returns:
public static Vector2i GetMouseDelta()
Summary: Retrieves the last mouse delta that occurred.
Returns: