UiTextBox turns key presses into characters through a hand-written US layout table, so a player on another keyboard layout gets the wrong characters in a save-game name.
SDL's SDL_EVENT_TEXT_INPUT gives composed text for any layout, but a panel broadcasts key events to every child, so text input would reach every text box at once. Two steps:
- Key events go to the panel's focused gadget only. The original keeps a focused-gadget index at
panel+0x64 (§99).
- The text box takes
SDL_EVENT_TEXT_INPUT and the layout table goes.
Where to look: src/rwe/ui/UiPanel.*, src/rwe/ui/UiTextBox.*, the event dispatch in SceneManager::execute, and src/rwe/ui/UiTextBox.test.cpp.
Watch for: the two subscription-lifetime hazards in CLAUDE.md; both have crashed the game before.
Done when: a save name typed on a non-US layout comes out as typed, with tests for the focus routing.
One item, one PR. Opened from the unchecked Phase 1 list in docs/ROADMAP.md; the findings it cites are in docs/TOTALA-EXE.md.
UiTextBoxturns key presses into characters through a hand-written US layout table, so a player on another keyboard layout gets the wrong characters in a save-game name.SDL's
SDL_EVENT_TEXT_INPUTgives composed text for any layout, but a panel broadcasts key events to every child, so text input would reach every text box at once. Two steps:panel+0x64(§99).SDL_EVENT_TEXT_INPUTand the layout table goes.Where to look:
src/rwe/ui/UiPanel.*,src/rwe/ui/UiTextBox.*, the event dispatch inSceneManager::execute, andsrc/rwe/ui/UiTextBox.test.cpp.Watch for: the two subscription-lifetime hazards in CLAUDE.md; both have crashed the game before.
Done when: a save name typed on a non-US layout comes out as typed, with tests for the focus routing.
One item, one PR. Opened from the unchecked Phase 1 list in
docs/ROADMAP.md; the findings it cites are indocs/TOTALA-EXE.md.