Expand description
The player’s key and button bindings (tickets 0217 and 0816, game ADR-0031,
game ADR-0053): every rebindable action has SLOTS key slots and SLOTS
controller-button slots. Each layout keeps its own keys
(LayoutBindings); the buttons are one setup shared by both layouts
(PadBindings); the lot is saved as PlayerKeys. Rules from
docs/design/controls.md, Rebinding keys and Rebinding buttons.
Pure: the game reads and writes the saved text. Generic over the game’s
ActionSet (ticket 1106).
Invariants: a chord is in at most one slot of a LayoutBindings’s
actions of each group, and no
reserved chord is in any; a button is in
at most one slot of a PadBindings’s actions of each group. Actions
of different groups may share one (docs/design/controls.md, Dialogue
log).
Structs§
- Layout
Bindings - One layout’s player-edited bindings: every rebindable action’s slots, plus the keys of the actions that can’t be rebound (Debug), from the keymap file.
- PadBindings
- The player-edited controller buttons: every rebindable action’s button
slots, each holding a button or a button chord (ticket
1034; a chord and its buttons on their own are different bindings).
One setup for both keyboard layouts (
docs/design/controls.md, Rebinding buttons); no button is reserved, and both sticks’ directions count as buttons. - Player
Keys - Every layout’s player bindings and the controller buttons, saved under whatever name the game stores them under. A layout the player hasn’t changed has no entry and uses its defaults, and so do the buttons. Each layout keeps its own keys; the buttons are shared by every layout.
Enums§
- Bind
Error - Why
LayoutBindings::bindorPadBindings::bindrefused.
Constants§
- PLAYER_
KEYS_ VERSION - Version written in, and required of, the saved config.
Type Aliases§
- Button
Slots - One action’s controller-button slots, each a button or a
button chord;
Noneis an empty slot. - Slots
- One action’s key slots;
Noneis an empty slot.