natiny_view_set_focusable

C
void natiny_view_set_focusable(NatinyView view, bool focusable);

Sets whether a press can give focus to a view. New views are focusable; a press on a non-focusable view instead selects its nearest focusable ancestor, or clears the focus when there is none.

Parameters

Name Type Description
view NatinyView View handle
focusable bool Whether a press can give focus to view

Example

C
/* Keep the backdrop pickable without letting it take the focus. */
natiny_view_set_focusable(backdrop, false);

Notes

  • Setting false clears the focus when view or one of its descendants is currently focused.
  • This setting does not disable picking, hover, presses, clicks, or hooks.