Lua UI API for keyboard / gamepad navigation
Prerequisite for #3740
Currently there is no way to enable / manipulate keyboard navigation for Lua UI.
This involves a few features:
- Enabling focus for a widget (on by default text inputs, buttons, etc)
- Some position-based heuristic for the order in which widgets are navigated to. Maybe we also need something like tabindex, but more general. A 2-dimensional "tab" index?
- Dehardcoding keyboard navigation binds. Most likely that entails
ui.navigateInDirection(util.Vector2)
andui.activate
, with bindings covered by #6679 (closed) - A way to separate navigation and text input. This is already a common issue with people accidentally searching in their inventory. Maybe we need a separate
ui.startTextInput
method to go from navigation mode to text input mode.
Edited by uramer