Repository navigation
feat: add dynamic controller button prompts to the action bar - #114
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IControllerPromptProvider/ControllerPromptProvider(Application,Prompts/): turns a semantic action + label into aControllerPromptwith the glyph (ControllerButton+ControllerFamily), a text key andAccessibilityText(e.g. "Botão cruz: Abrir").ActionMap.ControlForwith the current confirm/back convention, so changing the convention swaps both behavior and prompts.Enter,Esc,Espaço,F2,F10…; inside the on-screen keyboard: Enter/←/→/⌫).AppController.Prompts=Hintsresolved through the provider; the footer inMainWindowonly renders prompts (glyph or key cap) and sets the Narrator name per chip. No device-name checks anywhere in UI code.InputHostpublishes 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.SetActiveControllerraisesChanged, so the bar redraws in the same frame.Tests
PromptJourneyTests): keyboard prompts with no controller; Xbox → PlayStation hot swap updates prompts and raisesChangedonce; East-confirms convention moves Confirm/Back glyphs; a pinned style overrides the detected family; returning to keyboard.Closes #34
🤖 Generated with Claude Code