In-game tools · interface

PanelBinding

A panel with its world and its view already attached.

Explained in In-game tools.

interface PanelBinding
import type { PanelBinding } from '@driftengine/tools';

In depth

The generics are closed here rather than carried by the host. Panel<W, V> is two type parameters per panel, and a host holding several at once cannot express them in one list without erasing to unknown and casting on the way out. Binding closes them where both types are known and hands back something with no parameters at all, so the host never casts and the panel keeps the signature that makes its own rules checkable.

Properties

NameTypeDescription
idreadonlystring
titlereadonlystring

Methods

build

build(root: UiNode): void
ParameterTypeDescription
rootUiNode

route

route(event: UiEvent): Command | null
ParameterTypeDescription
eventUiEvent