Move tether toast to center of screen

- Reposition the tether toast from top-center (y=26) to ~75 px above
  screen center so it doesn't overlap the discovery toast.
- Update comments to reflect the new placement.
This commit is contained in:
Brian Fertig 2026-09-04 13:33:23 -06:00
parent f45e3d1cfd
commit 834be56557
1 changed files with 5 additions and 4 deletions

View File

@ -746,7 +746,7 @@ export class GameScene extends Phaser.Scene {
this.tetherToast(); this.tetherToast();
} }
/** Top-center console warning (below the discovery toast, magenta). */ /** Top-center console warning (magenta). */
tetherToast() { tetherToast() {
if (Array.isArray(this.tetherToastG)) { if (Array.isArray(this.tetherToastG)) {
for (const g of this.tetherToastG) g.destroy(); for (const g of this.tetherToastG) g.destroy();
@ -944,7 +944,7 @@ export class GameScene extends Phaser.Scene {
onComplete: () => ring.destroy(), onComplete: () => ring.destroy(),
}); });
// Top-center HUD toast, in the console language. // Center HUD toast (~75 px above screen center), in the console language.
if (Array.isArray(this.toast)) { if (Array.isArray(this.toast)) {
for (const g of this.toast) g.destroy(); for (const g of this.toast) g.destroy();
} }
@ -967,8 +967,9 @@ export class GameScene extends Phaser.Scene {
.setScrollFactor(0); // UI — pinned to the screen, not the world .setScrollFactor(0); // UI — pinned to the screen, not the world
const total = g1.width + 10 + g2.width; const total = g1.width + 10 + g2.width;
const x0 = this.scale.width / 2 - total / 2; const x0 = this.scale.width / 2 - total / 2;
g1.setPosition(x0, 26).setDepth(45).setAlpha(0); const y = this.scale.height / 2 - 75; // ~75 px above the screen center
g2.setPosition(x0 + g1.width + 10, 26).setDepth(45).setAlpha(0); g1.setPosition(x0, y).setDepth(45).setAlpha(0);
g2.setPosition(x0 + g1.width + 10, y).setDepth(45).setAlpha(0);
this.toast = [g1, g2]; this.toast = [g1, g2];
this.tweens.add({ targets: this.toast, alpha: 1, duration: 180, ease: 'Sine.easeOut' }); this.tweens.add({ targets: this.toast, alpha: 1, duration: 180, ease: 'Sine.easeOut' });
this.time.delayedCall(2400, () => { this.time.delayedCall(2400, () => {