Skip to main content

Interface: UiFocusEcsComponent

Defined in: ui/components/ui-focus-component.ts:14

Explicit directional focus overrides for a UiInteractableEcsComponent. Optional - every interactable is automatically focus-navigable by createUiNavigationEcsSystem's nearest-neighbor search, in the direction navigateInput points, among the other interactables on the same canvas. Add a UiFocusEcsComponent only to override that search on one or more sides, e.g. to wrap focus from the last item in a row back to the first, or to route around a layout where "nearest in that direction" isn't the element you want.

Properties​

down?​

optional down?: number

Defined in: ui/components/ui-focus-component.ts:19

The entity to focus on navigateInput pointing down, overriding the automatic search.


left?​

optional left?: number

Defined in: ui/components/ui-focus-component.ts:22

The entity to focus on navigateInput pointing left, overriding the automatic search.


optional right?: number

Defined in: ui/components/ui-focus-component.ts:25

The entity to focus on navigateInput pointing right, overriding the automatic search.


up?​

optional up?: number

Defined in: ui/components/ui-focus-component.ts:16

The entity to focus on navigateInput pointing up, overriding the automatic search.