🐛 fix build tray background and buttons ignoring uiOpacity

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

View File

@@ -1259,7 +1259,7 @@ export class UIScene extends Phaser.Scene {
const { width, height } = this.scale
const trayY = height - UIScene.BAR_H - UIScene.TRAY_H
const bg = this.add.rectangle(0, trayY, width, UIScene.TRAY_H, 0x0d0d0d, 0.88)
const bg = this.add.rectangle(0, trayY, width, UIScene.TRAY_H, 0x0d0d0d, this.uiOpacity)
.setOrigin(0, 0).setScrollFactor(0).setDepth(300)
this.actionTrayGroup.add(bg)
@@ -1275,10 +1275,10 @@ export class UIScene extends Phaser.Scene {
const itemW = 84
buildings.forEach((b, i) => {
const bx = 8 + i * (itemW + 4)
const btn = this.add.rectangle(bx, trayY + 4, itemW, UIScene.TRAY_H - 8, 0x1a2a1a, 0.9)
const btn = this.add.rectangle(bx, trayY + 4, itemW, UIScene.TRAY_H - 8, 0x1a2a1a, this.uiOpacity)
.setOrigin(0, 0).setScrollFactor(0).setDepth(301).setInteractive()
btn.on('pointerover', () => btn.setFillStyle(0x2d4a2d, 0.9))
btn.on('pointerout', () => btn.setFillStyle(0x1a2a1a, 0.9))
btn.on('pointerover', () => btn.setFillStyle(0x2d4a2d, this.uiOpacity))
btn.on('pointerout', () => btn.setFillStyle(0x1a2a1a, this.uiOpacity))
btn.on('pointerdown', () => {
this.closeActionTray()
this.deactivateCategory()