Desktop: Implement pointer lock for NumberInput (#3638)

* Desktop: Implement pointer lock for NumberInput

* add shift and ctrl modifiers

* fixup
This commit is contained in:
Timon
2026-01-15 11:27:31 +00:00
committed by GitHub
parent 6616d1bfb1
commit 73682b482b
12 changed files with 150 additions and 26 deletions
+6 -2
View File
@@ -315,8 +315,6 @@ export class UpdateFullscreen extends JsMessage {
readonly fullscreen!: boolean;
}
export class CloseWindow extends JsMessage {}
export class UpdateViewportHolePunch extends JsMessage {
readonly active!: boolean;
}
@@ -332,6 +330,11 @@ export class UpdateUIScale extends JsMessage {
readonly scale!: number;
}
export class WindowPointerLockMove extends JsMessage {
readonly x!: number;
readonly y!: number;
}
// Rust enum `Key`
export type KeyRaw = string;
// Serde converts a Rust `Key` enum variant into this format with both the `Key` variant name (called `RawKey` in TS) and the localized `label` for the key
@@ -1728,6 +1731,7 @@ export const messageMakers: Record<string, MessageMaker> = {
UpdatePlatform,
UpdateMaximized,
UpdateFullscreen,
WindowPointerLockMove,
UpdatePropertiesPanelLayout,
UpdatePropertiesPanelState,
UpdateStatusBarHintsLayout,