跳转到内容

bindWidgetValue

此内容尚不支持你的语言。

bindWidgetValue<C, K>(world, events, entity, component, field, signal, payloadKey?): () => void

Defined in: ui/binding/two-way.ts:32

Two-way bind signalentity’s component.field, with the widget’s change event as the upstream edge. payloadKey names the field in the change payload (e.g. 'value' for UISlider, 'isOn' for UIToggle, 'index' for UIDropdown). Returns a dispose that tears down both directions (the down-binding also auto-disposes on despawn).

C extends object

K extends string | number | symbol

World

EntityEventQueue

number

ComponentDef<C>

K

Signal<C[K]>

string = ...

() => void