From ec5a7ec2c310061ee238c2c30568eee990d594d5 Mon Sep 17 00:00:00 2001 From: "kevin.lhereec" Date: Mon, 17 Aug 2026 12:04:01 +0200 Subject: [PATCH] fix: button depth 100 to stay above cards, fix inactive text color --- client/src/game/scenes/GameScene.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/client/src/game/scenes/GameScene.js b/client/src/game/scenes/GameScene.js index 83ba3f3..fb1c08c 100644 --- a/client/src/game/scenes/GameScene.js +++ b/client/src/game/scenes/GameScene.js @@ -141,12 +141,12 @@ export class GameScene extends Phaser.Scene { fontSize: '17px', fontFamily: 'Georgia', fontStyle: 'bold', - color: '#1a0a00', + color: '#a08060', padding: { x: 28, y: 10 } }) .setOrigin(0.5) - .setAlpha(0.3) - .setDepth(10) + .setAlpha(1) + .setDepth(100) .setInteractive({ cursor: 'pointer' }) .on('pointerdown', this._playSelectedCard, this) .on('pointerover', () => { if (this._canPlay && this.selectedCard) this.playBtn.setScale(1.05) }) @@ -157,7 +157,7 @@ export class GameScene extends Phaser.Scene { fontSize: '12px', fontFamily: 'Georgia', color: '#a08060' - }).setOrigin(0.5).setDepth(10) + }).setOrigin(0.5).setDepth(100) } _drawBtnBg(active) { @@ -176,18 +176,17 @@ export class GameScene extends Phaser.Scene { this.playBtnBg.lineStyle(2, 0xffd700) this.playBtnBg.strokeRoundedRect(width / 2 - btnW / 2, btnY - btnH / 2, btnW, btnH, 8) } - this.playBtnBg.setDepth(9) + this.playBtnBg.setDepth(99) } _activateBtn() { this._drawBtnBg(true) - this.playBtn.setAlpha(1).setColor('#1a0a00') - // Animation pulse + // Texte sombre sur fond doré + this.playBtn.setColor('#1a0a00').setAlpha(1) if (this._pulseTween) this._pulseTween.stop() this._pulseTween = this.tweens.add({ - targets: this.playBtn, - scaleX: 1.04, - scaleY: 1.04, + targets: this.playBtnBg, + alpha: 0.85, duration: 600, yoyo: true, repeat: -1, @@ -197,7 +196,8 @@ export class GameScene extends Phaser.Scene { _deactivateBtn() { this._drawBtnBg(false) - this.playBtn.setAlpha(0.3).setColor('#a08060').setScale(1) + // Texte clair sur fond sombre pour rester lisible + this.playBtn.setColor('#6a5040').setAlpha(1).setScale(1) if (this._pulseTween) { this._pulseTween.stop(); this._pulseTween = null } }