In-game tools · interface
Panel
Explained in In-game tools.
interface Panel<W, V>import type { Panel } from '@driftengine/tools';Properties
| Name | Type | Description |
|---|---|---|
idreadonly | string | Stable for the life of the panel. What the dock layout stores. |
titlereadonly | string | What the dock tab says. |
Methods
build
build(world: Readonly<W>, view: V, root: UiNode): voidFill root from the world and the view. Called whenever either may have changed.
| Parameter | Type | Description |
|---|---|---|
world | Readonly<W> | |
view | V | |
root | UiNode |
route
route(world: Readonly<W>, view: V, event: UiEvent): Command | nullWhat this event asks of the world, or nothing.
| Parameter | Type | Description |
|---|---|---|
world | Readonly<W> | |
view | V | |
event | UiEvent |
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.