class
Application
public static abstract sealed class Application Properties
| Name | Type | Description |
|---|---|---|
OnWidgetClicked static | Action<Widget, MouseEvent> | Called when any widget is clicked. Can set MouseEvent.Accepted to true to prevent the Widget's OnMouseClick from firing. |
DpiScale static | Single | |
CursorPosition static | Vector2 | Get/Set cursor position. |
UnscaledCursorPosition static | Vector2 | The cursor position, not scaled for DPI |
CursorDelta static | Vector2 | The cursor delta between this and previous frame. |
MouseWheelDelta static | Vector2 | The mouse wheel delta between this and previous frame |
KeyboardModifiers static | KeyboardModifiers | Returns which keyboard modified keys are held down right at this point. |
MouseButtons static | MouseButtons | Returns the current state of the mouse buttons. |
FocusWidget static | Widget | The Widget that has the keyboard input focus, or nullif no widget in this application has the focus. |
HoveredWidget static | Widget | The Widget that is currently hovered |
Editor static | EditorSystem | Get the current editor if any. Will return null if we're not in the editor, or there is no active editor session. |
Methods
static Void SetStyles(String style) static Void Spin() Will process all of the UI events - allowing the UI to stay responsive during a blocking call.
static Boolean IsKeyDown(KeyCode code) Returns whether or not a key is currently being held down.
static String KeyCodeToString(KeyCode code) Converts an editor keycode to a string used by the game Qt::Key -> WindowsVirtualKey -> ButtonCode_t -> string
code