The 2D layer · interface
UiInput
What the router remembers between calls.
Explained in Sprites and tilemaps.
interface UiInputimport type { UiInput } from '@driftengine/ui2d';In depth
Held by the caller rather than by the tree, because a tree can be shown in two places — a HUD and an editor preview of the same tree — and each has its own pointer. It is also what makes the router testable without a tree at all.
Properties
| Name | Type | Description |
|---|---|---|
hovered | UiNode | null | |
pressed | UiNode | null | The node the pointer went down on, until it comes up again. |
focused | UiNode | null | |
wasDown | boolean | Whether the pointer was down at the previous call, so an edge can be found. |