VirtualButtonOptions
此内容尚不支持你的语言。
Defined in: ui/widgets/virtual-controls.ts:47
Extends
Section titled “Extends”Properties
Section titled “Properties”background?
Section titled “background?”
optionalbackground?:UIVisualInit
Defined in: ui/widgets/button.ts:33
Background renderer config. Default: solid white quad.
Inherited from
Section titled “Inherited from”disabled?
Section titled “disabled?”
optionaldisabled?:boolean
Defined in: ui/widgets/button.ts:47
Start in the disabled state (Interactable.enabled = false).
Inherited from
Section titled “Inherited from”events
Section titled “events”events:
EntityEventQueue
Defined in: ui/widgets/button.ts:28
Inherited from
Section titled “Inherited from”fadeDuration?
Section titled “fadeDuration?”
optionalfadeDuration?:number
Defined in: ui/widgets/button.ts:45
Tween time for color/scale state changes. Default 0 (snap).
Inherited from
Section titled “Inherited from”focusable?
Section titled “focusable?”
optionalfocusable?:boolean
Defined in: ui/widgets/button.ts:49
Participate in Tab traversal + Enter/Space activation. Default true.
Inherited from
Section titled “Inherited from”inputId?
Section titled “inputId?”
optionalinputId?:string
Defined in: ui/widgets/virtual-controls.ts:47
optionalnode?:UINodeInit
Defined in: ui/widgets/button.ts:31
CSS-box layout. Default: fill the parent.
Inherited from
Section titled “Inherited from”onClick?
Section titled “onClick?”
optionalonClick?: (entity) =>void
Defined in: ui/widgets/button.ts:52
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”parent?
Section titled “parent?”
optionalparent?:number
Defined in: ui/widgets/button.ts:29
Inherited from
Section titled “Inherited from”states?
Section titled “states?”
optionalstates?:Record<string,ButtonStateVisual>
Defined in: ui/widgets/button.ts:43
Map of state name (e.g. “normal”, “hover”, “pressed”, “disabled”)
to its visual override. The $interaction driver writes the four
canonical state names; callers may add more (e.g. “loading”) and
flip them manually via setButtonState. Omit to default to the
active theme’s control roles (themeButtonStates).
Inherited from
Section titled “Inherited from”tabIndex?
Section titled “tabIndex?”
optionaltabIndex?:number
Defined in: ui/widgets/button.ts:51
Tab order within the focus ring. Default 0 (document order).
Inherited from
Section titled “Inherited from”
optionaltext?:string|TextInit
Defined in: ui/widgets/button.ts:35
Label text. Omit to skip spawning a child label entity.
Inherited from
Section titled “Inherited from”userGesture?
Section titled “userGesture?”
optionaluserGesture?:boolean
Defined in: ui/widgets/button.ts:56
Run onClick inside the host’s own release event rather than on the next
frame, for a call a host accepts only from a player’s gesture (sharing a
recording on WeChat).
Inherited from
Section titled “Inherited from”value?
Section titled “value?”
optionalvalue?:number
Defined in: ui/widgets/virtual-controls.ts:47
world:
World
Defined in: ui/widgets/button.ts:27