Skip to main content

Function: deriveUiInteractionVisualState()

deriveUiInteractionVisualState(interactable): UiInteractionVisualState

Defined in: ui/types/ui-interaction-visual-state.ts:28

Derives the merged visual state a UiInteractableEcsComponent is currently in: disabled when not interactable, pressed while a press is captured, hover while hovered or focused (pointer and gamepad read as the same highlighted state), normal otherwise.

Parameters​

interactable​

The interactable's interactable/isPressed/ isHovered/isFocused state.

interactable​

boolean

isFocused​

boolean

isHovered​

boolean

isPressed​

boolean

Returns​

UiInteractionVisualState

The derived visual state.