While covering NameModalHUD (Wave 8 a5, tests only) the language-change paths were compared to resize().
What happens:setLanguage() (called every frame from updateModalHUDs when the code actually changes) and the language hit-mesh in handleClick both do clearGroup() + buildUI() without saving the live HUDTextInput value. buildUI() disposes the old input and constructs a new empty one. resize() already avoids this with _restoreName.
User-visible: typing a name, then clicking the language row (or a parent calling setLanguage("es")) clears the field and greys Confirm. The per-frame idempotent guard stops 60 Hz rebuilds, but a real en↔es change still wipes the name.
Fix: capture this.nameInput?.getValue() into _restoreName before dispose/rebuild in setLanguage and the language-click branch, the same way resize does.
Repro (jsdom):new NameModalHUD(800,600); hud.setPlayerName("Ada"); hud.setLanguage("es"); → getPlayerName() is "".
While covering `NameModalHUD` (Wave 8 a5, tests only) the language-change paths were compared to `resize()`.
**What happens:** `setLanguage()` (called every frame from `updateModalHUDs` when the code actually changes) and the language hit-mesh in `handleClick` both do `clearGroup()` + `buildUI()` without saving the live `HUDTextInput` value. `buildUI()` disposes the old input and constructs a new empty one. `resize()` already avoids this with `_restoreName`.
**User-visible:** typing a name, then clicking the language row (or a parent calling `setLanguage("es")`) clears the field and greys Confirm. The per-frame idempotent guard stops 60 Hz rebuilds, but a real en↔es change still wipes the name.
**Fix:** capture `this.nameInput?.getValue()` into `_restoreName` before dispose/rebuild in `setLanguage` and the language-click branch, the same way `resize` does.
**Repro (jsdom):** `new NameModalHUD(800,600); hud.setPlayerName("Ada"); hud.setLanguage("es");` → `getPlayerName()` is `""`.
File: `projects/spikersoft/src/app/_components/_games/dungeon-crawler/hud/name-modal-hud.ts`
Resolved in spikersoft-angular PR #819 (merged to master). NameModalHUD language change keeps the typed player name. Closing.
Resolved in spikersoft-angular [PR #819](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/819) (merged to `master`). NameModalHUD language change keeps the typed player name. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
While covering
NameModalHUD(Wave 8 a5, tests only) the language-change paths were compared toresize().What happens:
setLanguage()(called every frame fromupdateModalHUDswhen the code actually changes) and the language hit-mesh inhandleClickboth doclearGroup()+buildUI()without saving the liveHUDTextInputvalue.buildUI()disposes the old input and constructs a new empty one.resize()already avoids this with_restoreName.User-visible: typing a name, then clicking the language row (or a parent calling
setLanguage("es")) clears the field and greys Confirm. The per-frame idempotent guard stops 60 Hz rebuilds, but a real en↔es change still wipes the name.Fix: capture
this.nameInput?.getValue()into_restoreNamebefore dispose/rebuild insetLanguageand the language-click branch, the same wayresizedoes.Repro (jsdom):
new NameModalHUD(800,600); hud.setPlayerName("Ada"); hud.setLanguage("es");→getPlayerName()is"".File:
projects/spikersoft/src/app/_components/_games/dungeon-crawler/hud/name-modal-hud.tsResolved in spikersoft-angular PR #819 (merged to
master). NameModalHUD language change keeps the typed player name. Closing.