The 2D layer · function

uiFocusNext

The next focusable node after current, wrapping.

Explained in Sprites and tilemaps.

function uiFocusNext(root: UiNode, current: UiNode | null): UiNode | null
import { uiFocusNext } from '@driftengine/ui2d';

Parameters

ParameterTypeDescription
rootUiNode
currentUiNode | null

In depth

null for current starts at the first, which is what a tree that has never been focused wants. null comes back only when nothing at all is focusable.