padNav
Gamepad / keyboard focus navigation over any widget trees. `collect(trees)` gathers every node that has an `id` and a `props.onClick` (the game's own screens and incrementalKit's alike) with the rect it was laid out at; `step(items, from, dx, dy)` moves the focus to the nearest b…
padNav.module
Gamepad / keyboard focus navigation over any widget trees. collect(trees) gathers every node that has an id and
a props.onClick (the game's own screens and incrementalKit's alike) with the rect it was laid out at;
step(items, from, dx, dy) moves the focus to the nearest button in a d-pad direction (wrapping around);
first(items, prefer) picks where focus starts. game.ui.TumbleUI calls it, activates the focused button's
callback on A / Enter and draws the focus ring.
Scoped to this part · feeds back into the world's score.