simvx.core.ui_input¶
UIInputManager — Handles UI input routing, focus, popups, and hit-testing.
Extracted from SceneTree to separate game-logic concerns (process/draw/groups) from UI input routing (mouse events, keyboard focus, popups, hover tracking).
Module Contents¶
Classes¶
Routes UI input events to controls — focus, hover, mouse grab, popups. |
Data¶
API¶
- class simvx.core.ui_input.UIInputManager[source]¶
Routes UI input events to controls — focus, hover, mouse grab, popups.
Initialization
- push_popup(control)[source]¶
Register a control as an active popup (drawn on top, receives input first).
- ui_input(root: simvx.core.node.Node | None, mouse_pos=None, button: int = 0, pressed: bool = True, key: str = '', char: str = '')[source]¶
Route UI input events to controls.
- touch_input(root: simvx.core.node.Node | None, finger_id: int, action: int, x: float, y: float)[source]¶
Route a multi-touch event to a specific control.
For controls with touch_mode=”multi”, each finger is tracked independently. On down: hit-test for the control, store in _touch_grabs, deliver press. On move: deliver to grabbed control. On up: deliver release, remove grab.
Args: root: Scene root node. finger_id: Touch finger identifier. action: 0=down, 1=up, 2=move. x, y: Touch position in screen coordinates.