diff options
| author | OreoFR <29048345+OreoFR@users.noreply.github.com> | 2026-12-03 03:49:05 +0100 |
|---|---|---|
| committer | OreoFR <29048345+OreoFR@users.noreply.github.com> | 2026-12-03 03:49:05 +0100 |
| commit | efa45bab9a54bb1315ec3f1970645fce0f4c944d (patch) | |
| tree | a0e6fa117f2cd90c92e81f07769b16d2193993dc /runtime/src/xma2_decoder.cpp | |
| parent | 636e61f9427aeecaa6f7c97aab40b72945a37c7d (diff) | |
launcher: a Controls page writes the keyboard and mouse binds (LEONIDA_KBM_BINDS)
A Controls page between Settings and Mods:
- the main default keys in short (docs/gameinput.md has them all);
- the player's binds as rows: where (Both / On foot / In a vehicle, a
Segmented), the key (its button reads "Press a key…" and takes the next key
or the left or right mouse button, Tk keysyms mapped to kbm.rs's names; Esc
cancels), the pad input (Cross, Circle, Square, Triangle, shoulders,
triggers, stick clicks and pushes, d-pad, View, Menu, or Nothing), and a
cross to remove it; Add bind, and Reset to defaults after a confirmation;
- F1, F3, F4, F8, F9, Alt, Caps Lock and keys kbm.rs cannot read are refused
at capture with a red line (the runtime skips them anyway).
Every change is saved at once as the new setting kbm_binds, in kbm.rs's
syntax (scope:key=action;...), and PLAY passes it as LEONIDA_KBM_BINDS
through -More (extra_variables), so the Play page's options line and Copy my
info show it. A LEONIDA_KBM_BINDS in Settings' advanced options wins, and
the page says so; a saved value the page cannot read is kept whole and
shown as it is. The runtime reads the variable once #3276
(D3D12-KBM-BINDS) is merged; until then it is passed and ignored.
New texts in de/es/fr/pt; docs/launcher.md has a Controls entry.
Tests: ControlsTests (round trip of the string and the rows, any case and
kbm.rs's other names; keysyms of letters, digits, F keys, the keypad with
Num Lock on and off, arrows, Space/Enter/Esc/Tab/Backspace, shifts, ctrls,
mouse buttons, and keys refused; the reserved keys; normalise;
extra_variables, -More and Copy my info; Advanced wins) and a guard that
every scope, key and action the page writes is one kbm.rs reads, with the
names taken from kbm.rs's key_named/action_named/entry/RESERVED text
(LEONIDA_KBM_RS points it at #3276's file; skipped while main's kbm.rs has
no LEONIDA_KBM_BINDS). The i18n test now covers the action labels and the
default keys' lines. 120 tests OK (1 skipped: that guard; run against
#3276's kbm.rs it passes). Counter-tests: no LEONIDA_KBM_BINDS passed, a
wrong keysym, a name kbm.rs does not read and a short reserved list each
fail their test. Real window (isolated APPDATA): the empty page, F1 refused
with the red line while capture goes on, G/R/V captured by key events into
both:G=Square;both:R=none;foot:V=RB, saved to launcher.json, and the Play
page's options line showing LEONIDA_KBM_BINDS.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/xma2_decoder.cpp')
0 files changed, 0 insertions, 0 deletions