diff --git a/CHANGELOG.md b/CHANGELOG.md index 86a7b03..ca2999b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Fixed +- **Stockpile-Overlay Transparenz** (Issue #39): `updateStaticPanelOpacity()` verwendete `setAlpha()` statt `setFillStyle()` — dadurch wurde die Opacity quadratisch statt linear angewendet; bei 100 % blieb das Panel sichtbar transparent +- **Action Bar Transparenz** (Issue #40): Action Bar ignorierte `uiOpacity` komplett — Hintergrund war hardcoded auf 0.92; wird jetzt korrekt mit `uiOpacity` erstellt und per `updateStaticPanelOpacity()` live aktualisiert + ### Performance - **Event-queue timers** (Issue #36): crops, tree seedlings, and tile-recovery events now use a sorted priority queue with absolute `gameTime` timestamps instead of per-frame countdown iteration — O(due items) per tick instead of O(total items); `WorldState.gameTime` tracks the in-game clock; save migrated from v5 to v6 diff --git a/src/scenes/UIScene.ts b/src/scenes/UIScene.ts index 770bf89..6c9cfda 100644 --- a/src/scenes/UIScene.ts +++ b/src/scenes/UIScene.ts @@ -783,11 +783,12 @@ export class UIScene extends Phaser.Scene { /** * Applies the current uiOpacity to all static UI elements that are not - * rebuilt on open (stockpile panel, debug panel background). + * rebuilt on open (stockpile panel, action bar, debug panel background). * Called whenever uiOpacity changes. */ private updateStaticPanelOpacity(): void { - this.stockpilePanel.setAlpha(this.uiOpacity) + this.stockpilePanel.setFillStyle(0x000000, this.uiOpacity) + this.actionBarBg.setFillStyle(0x080808, this.uiOpacity) const hexAlpha = Math.round(this.uiOpacity * 255).toString(16).padStart(2, '0') this.debugPanelText.setStyle({ backgroundColor: `#000000${hexAlpha}` }) } @@ -1169,7 +1170,7 @@ export class UIScene extends Phaser.Scene { const { width, height } = this.scale const barY = height - UIScene.BAR_H - this.actionBarBg = this.add.rectangle(0, barY, width, UIScene.BAR_H, 0x080808, 0.92) + this.actionBarBg = this.add.rectangle(0, barY, width, UIScene.BAR_H, 0x080808, this.uiOpacity) .setOrigin(0, 0).setScrollFactor(0).setDepth(300) this.actionBuildBtn = this.add.rectangle(8, barY + 8, 88, 32, 0x1a3a1a, 0.9)