The 2D layer · interface

UiInput

What the router remembers between calls.

Explained in Sprites and tilemaps.

interface UiInput
import 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

NameTypeDescription
hoveredUiNode | null
pressedUiNode | nullThe node the pointer went down on, until it comes up again.
focusedUiNode | null
wasDownbooleanWhether the pointer was down at the previous call, so an edge can be found.