🐛 fix seam between action tray and bar

Tray bg now covers bar area (TRAY_H + BAR_H), actionBarBg is hidden
while tray is open to avoid double-transparency artifacts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-24 17:12:30 +00:00
parent 84aa1a7ce5
commit f78645bb79

View File

@@ -1255,12 +1255,13 @@ export class UIScene extends Phaser.Scene {
this.actionTrayVisible = true this.actionTrayVisible = true
this.actionTrayGroup.destroy(true) this.actionTrayGroup.destroy(true)
this.actionTrayGroup = this.add.group() this.actionTrayGroup = this.add.group()
this.actionBarBg.setAlpha(0)
const { width, height } = this.scale const { width, height } = this.scale
const trayY = height - UIScene.BAR_H - UIScene.TRAY_H const trayY = height - UIScene.BAR_H - UIScene.TRAY_H
const bg = this.add.rectangle(0, trayY, width, UIScene.TRAY_H, 0x0d0d0d, this.uiOpacity) const bg = this.add.rectangle(0, trayY, width, UIScene.TRAY_H + UIScene.BAR_H, 0x080808, this.uiOpacity)
.setOrigin(0, 0).setScrollFactor(0).setDepth(300) .setOrigin(0, 0).setScrollFactor(0).setDepth(299)
this.actionTrayGroup.add(bg) this.actionTrayGroup.add(bg)
const buildings: { kind: BuildingType; emoji: string; label: string }[] = [ const buildings: { kind: BuildingType; emoji: string; label: string }[] = [
@@ -1305,6 +1306,7 @@ export class UIScene extends Phaser.Scene {
this.actionTrayVisible = false this.actionTrayVisible = false
this.actionTrayGroup.destroy(true) this.actionTrayGroup.destroy(true)
this.actionTrayGroup = this.add.group() this.actionTrayGroup = this.add.group()
this.actionBarBg.setAlpha(1)
} }
// ─── Resize ─────────────────────────────────────────────────────────────── // ─── Resize ───────────────────────────────────────────────────────────────