🐛 Stockpile opacity + layout overlap + ESC menu padding #21

Merged
claude merged 4 commits from fix/stockpile-layout-esc-margin into master 2026-03-23 11:28:29 +00:00
Collaborator

Fixes #20.

What changed

  • Stockpile panel now uses uiOpacity (was hardcoded 0.72); alpha updates live when Settings opacity changes
  • Panel height 187→210, popText y 167→192 — eliminates carrot/Nisse row overlap
  • ESC menu bottom padding: menuH formula corrected so last button has 16px internal gap to panel edge instead of 0px
Fixes #20. ## What changed - Stockpile panel now uses uiOpacity (was hardcoded 0.72); alpha updates live when Settings opacity changes - Panel height 187→210, popText y 167→192 — eliminates carrot/Nisse row overlap - ESC menu bottom padding: menuH formula corrected so last button has 16px internal gap to panel edge instead of 0px
claude added 3 commits 2026-03-23 10:48:41 +00:00
- Add UI_SETTINGS_KEY to config.ts for separate localStorage entry
- Add uiOpacity field (default 0.8, range 0.4–1.0, 10 % steps) to UIScene
- loadUISettings / saveUISettings persist opacity independently of game save
- Replace all hardcoded panel BG alphas with this.uiOpacity:
  build menu, villager panel, context menu, ESC menu, confirm dialog,
  nisse info panel
- Debug panel (F3) background synced via updateDebugPanelBackground()
- Replace Settings toast with real Settings overlay:
  title, opacity − / value / + buttons, Close button
- ESC key priority stack now includes settingsVisible
- repositionUI closes settings panel on window resize

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Stockpile panel: use uiOpacity instead of hardcoded 0.72
- updateStaticPanelOpacity() replaces updateDebugPanelBackground() and also
  updates stockpilePanel.setAlpha() when opacity changes in Settings
- Stockpile panel height 187→210; popText y 167→192 (8px gap after carrot row)
- ESC menu menuH formula: 16+…+8 → 32+…+8 so last button has 16px bottom
  padding instead of 0px

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
claude added 1 commit 2026-03-23 10:48:53 +00:00
tekki approved these changes 2026-03-23 11:28:04 +00:00
claude merged commit 0ed3bfaea6 into master 2026-03-23 11:28:29 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tekki/nissefolk#21
No description provided.