✨ overlay opacity: global setting + settings screen (Issue #16)
- 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>
This commit is contained in:
@@ -49,6 +49,9 @@ export const VILLAGER_NAMES = [
|
||||
export const SAVE_KEY = 'tg_save_v5'
|
||||
export const AUTOSAVE_INTERVAL = 30_000
|
||||
|
||||
/** localStorage key for UI settings (opacity etc.) — separate from the game save. */
|
||||
export const UI_SETTINGS_KEY = 'tg_ui_settings'
|
||||
|
||||
/** Milliseconds for one tree-seedling stage to advance (two stages = full tree). */
|
||||
export const TREE_SEEDLING_STAGE_MS = 60_000 // 1 min per stage → 2 min total
|
||||
|
||||
|
||||
Reference in New Issue
Block a user