In-game tools · interface

Panel

Explained in In-game tools.

interface Panel<W, V>
import type { Panel } from '@driftengine/tools';

Properties

NameTypeDescription
idreadonlystringStable for the life of the panel. What the dock layout stores.
titlereadonlystringWhat the dock tab says.

Methods

build

build(world: Readonly<W>, view: V, root: UiNode): void

Fill root from the world and the view. Called whenever either may have changed.

ParameterTypeDescription
worldReadonly<W>
viewV
rootUiNode

route

route(world: Readonly<W>, view: V, event: UiEvent): Command | null

What this event asks of the world, or nothing.

ParameterTypeDescription
worldReadonly<W>
viewV
eventUiEvent
More

May write view — a drag has to be recorded somewhere, and so do a scroll and a hover. May not write world, which is what the command it returns is for.