Commit 3744feb
committed
Fix 92: defer boot data injection to MMS render#2+ (after first layout)
Root cause of missing player name/gold/diamond/stamina/level text labels:
- checkForDelayedBootData was called in MMS render#1 case 0, BEFORE
stage.act() runs (inside cprus_BaseScreen_render at case 1)
- At that point, PlayerInfoView.getWidth() = 0 (layout not done)
- setPlayerName's abbreviation loop: prefWidth > 0 - 0 = TRUE → enters
infinite abbreviation loop since no label can fit in width=0
- Loop eventually fails (StringUtils.abbreviate with width<4 throws),
addActor never called → player name label is never in the scene
Fix 92a: only call checkForDelayedBootData when _mmsRender >= 2
→ by render#2, BaseScreen_render (case 1) has run once → stage.act()
→ layout is valid → getWidth() > 0
Fix 92b: in setPlayerName, guard abbreviation loop with getWidth() > 0
→ if not laid out yet, skip abbreviation entirely (label will be
re-laid out via invalidate() anyway)
https://claude.ai/code/session_01XQ6Lv2cEvrtZLgGCFgDDjT1 parent 232195d commit 3744feb
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505295 | 505295 | | |
505296 | 505296 | | |
505297 | 505297 | | |
505298 | | - | |
| 505298 | + | |
505299 | 505299 | | |
505300 | 505300 | | |
505301 | 505301 | | |
| |||
1535020 | 1535020 | | |
1535021 | 1535021 | | |
1535022 | 1535022 | | |
1535023 | | - | |
| 1535023 | + | |
| 1535024 | + | |
1535024 | 1535025 | | |
1535025 | 1535026 | | |
1535026 | 1535027 | | |
| |||
0 commit comments