Context
PR #196 added a standalone Controls Mapper at /tests/ControlsMapper. That view is exclusively for testing the mapper and stays as-is — games do not use it.
Goal
Add a per-game controls-mapping dialog — a modal in the same style as the lobby wizard (GameLobbyWizard) — that lets the player configure that game's key/gamepad/faux-pad bindings before playing. Each game opens its own dialog with its own action set, and the resulting mapping drives that game's createControls.
Scope
Reference
- Reusable config pieces:
src/components/ControlsMapper/*, src/stores/controlsMapper.ts
- Wizard/dialog pattern:
src/components/GameLobbyWizard.vue, src/components/LobbyUI/* (e.g. LobbyUIConfirm for the modal shell)
- Package API:
@webgamekit/controls (getMapping, setMapping, assignBinding, createDefaultMapping, savePresets/loadPresets)
- Per-game input pattern:
createControls({ mapping }) + KEYBOARD_MAPPING in each game's config.ts
Context
PR #196 added a standalone Controls Mapper at
/tests/ControlsMapper. That view is exclusively for testing the mapper and stays as-is — games do not use it.Goal
Add a per-game controls-mapping dialog — a modal in the same style as the lobby wizard (
GameLobbyWizard) — that lets the player configure that game's key/gamepad/faux-pad bindings before playing. Each game opens its own dialog with its own action set, and the resulting mapping drives that game'screateControls.Scope
ControlsMapperBindings,ControlsMapperStyle, presets) — not the standalone/tests/ControlsMapperview.KEYBOARD_MAPPING.createControls(viamapping/setMapping), including the on-screen faux-pad / touch buttons./tests/ControlsMapperview unchanged (testing only)..lobby__game-card: remove border/box-shadow at rest, keep the border on focus (flat LobbyUI consistency).Reference
src/components/ControlsMapper/*,src/stores/controlsMapper.tssrc/components/GameLobbyWizard.vue,src/components/LobbyUI/*(e.g.LobbyUIConfirmfor the modal shell)@webgamekit/controls(getMapping,setMapping,assignBinding,createDefaultMapping,savePresets/loadPresets)createControls({ mapping })+KEYBOARD_MAPPINGin each game'sconfig.ts