Skip to content

feat: add dynamic controller button prompts to the action bar - #114

Merged
nextestudios merged 1 commit into
mainfrom
feature/34-dynamic-prompts
Sep 27, 2026
Merged

nextestudios merged 1 commit into
mainfrom
feature/34-dynamic-prompts

Conversation

@nextestudios

Copy link
Copy Markdown
Owner

Summary

  • IControllerPromptProvider / ControllerPromptProvider (Application, Prompts/): turns a semantic action + label into a ControllerPrompt with the glyph (ControllerButton + ControllerFamily), a text key and AccessibilityText (e.g. "Botão cruz: Abrir").
    • Uses ActionMap.ControlFor with the current confirm/back convention, so changing the convention swaps both behavior and prompts.
    • Family = manual style from the menu, or the active controller's family in Automatic.
    • No active controller → keyboard keys (Enter, Esc, Espaço, F2, F10…; inside the on-screen keyboard: Enter/←/→/⌫).
  • AppController.Prompts = Hints resolved through the provider; the footer in MainWindow only renders prompts (glyph or key cap) and sets the Narrator name per chip. No device-name checks anywhere in UI code.
  • Hot swap: InputHost publishes the family on active-device change and again when the active pad is pressed after keyboard use; a physical key that maps to an action switches the bar to keyboard prompts. SetActiveController raises Changed, so the bar redraws in the same frame.

Tests

  • CI (unit, PromptJourneyTests): keyboard prompts with no controller; Xbox → PlayStation hot swap updates prompts and raises Changed once; East-confirms convention moves Confirm/Back glyphs; a pinned style overrides the detected family; returning to keyboard.
  • Manual (docs/TESTING.md): real hot swap with two controllers, keyboard ↔ controller switching, convention swap on screen.

Closes #34

🤖 Generated with Claude Code

Add IControllerPromptProvider/ControllerPromptProvider that turns each
context hint into the active family's glyph, a keyboard key when no
controller is in use, and Narrator text. Prompts follow the confirm/back
convention and swap instantly when the active controller changes; using the
physical keyboard switches the bar to keys until a controller button is
pressed again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@nextestudios
nextestudios merged commit 364386c into main Sep 27, 2026
1 check passed
@nextestudios
nextestudios deleted the feature/34-dynamic-prompts branch September 27, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add dynamic controller button prompts to action bar

1 participant