UIElement:first_focusable

Advanced

Returns the first focusable element inside this one (or itself). Only elements which can receive input are considered.

It is unlikely you need to override this method when implementing custom elements, but you may have to call it to implement next_focusable.

This method does incur a tree traversal.

Usage

ui_element:first_focusable(player_index)

Arguments

Name Type Description
player_index number Number identifying the player whose inputs to consider.

Returns

Name Type Description
element UIElement | nil First focusable element, if any.

This site uses Just the Docs, a documentation theme for Jekyll.