1 client ui focus and text input planning
forgejo-actions edited this page 2026-07-15 12:43:13 +00:00

Client UI Focus And Text Input Planning

Client UI focus and text input planning route keyboard, gamepad, text, submit, cancel, and activation intent across standalone menus and gameplay Bevy panels.

How It Works

The focus planner selects the first focusable item when nothing is focused, wraps navigation, clears stale entities, and emits activation output. Text input planning handles submit, backspace, clear, and insert while rejecting control characters.

Standalone menus convert input profiles into menu intents. Gameplay UI adds focus filtering, chat/keybind capture, hidden/noop button handling, and gameplay-input blocking.

How To Use It

When adding a focusable control, give it stable order, visibility, and activation semantics. When adding text input, route text through the input plan so gameplay controls do not receive typed characters.

Invariants

Hidden or noop controls should not receive actions. Cancel should route to the active screen's priority path. Chat and keybind capture must block gameplay movement and combat input.

Debugging

Focus order drift, hidden buttons receiving actions, Escape routed to the wrong screen, and typed text leaking into gameplay are the main issues. Use planner unit tests before debugging Bevy input directly.

Examples

If a hidden delete button activates from gamepad navigation, remove it from the focus plan while hidden. If chat typing moves the player, inspect input capture before movement bindings.