refactor: reorganize Balatro stats panel layout
Rearrange the chips/mult display area to add labeled headers and improve visual hierarchy. Move the hand name text upward to accommodate the new layout structure.
This commit is contained in:
parent
4fe8d0861d
commit
ec6efd7e4e
|
|
@ -727,8 +727,10 @@ export default class BalatroGame extends Phaser.Scene {
|
||||||
this._roundScoreText = this.text(X + W - 24, sy - 6, fmtChips(this._roundScoreOverride ?? run.roundScore), 34, C.ink, { ox: 1, bold: true });
|
this._roundScoreText = this.text(X + W - 24, sy - 6, fmtChips(this._roundScoreOverride ?? run.roundScore), 34, C.ink, { ox: 1, bold: true });
|
||||||
|
|
||||||
// chips × mult live boxes
|
// chips × mult live boxes
|
||||||
const cy = sy + 66;
|
const cy = sy + 100;
|
||||||
const half = (W - 64) / 2;
|
const half = (W - 64) / 2;
|
||||||
|
this.text(X + 24 + half / 2, cy - 22, 'Chips', 15, C.chipsHex, { ox: 0.5, oy: 0.5, bold: true });
|
||||||
|
this.text(X + 40 + half * 1.5, cy - 22, 'Multi', 15, C.multHex, { ox: 0.5, oy: 0.5, bold: true });
|
||||||
const chipsBox = this.panel(X + 24, cy, half, 64, { fill: C.chips, alpha: 0.85, stroke: false, radius: 10 });
|
const chipsBox = this.panel(X + 24, cy, half, 64, { fill: C.chips, alpha: 0.85, stroke: false, radius: 10 });
|
||||||
const multBox = this.panel(X + 40 + half, cy, half, 64, { fill: C.mult, alpha: 0.85, stroke: false, radius: 10 });
|
const multBox = this.panel(X + 40 + half, cy, half, 64, { fill: C.mult, alpha: 0.85, stroke: false, radius: 10 });
|
||||||
this._chipsText = this.text(X + 24 + half / 2, cy + 32, '0', 30, C.ink, { ox: 0.5, oy: 0.5, bold: true });
|
this._chipsText = this.text(X + 24 + half / 2, cy + 32, '0', 30, C.ink, { ox: 0.5, oy: 0.5, bold: true });
|
||||||
|
|
@ -737,7 +739,7 @@ export default class BalatroGame extends Phaser.Scene {
|
||||||
this._shakeTargets = [chipsBox, multBox, this._chipsText, this._multText]
|
this._shakeTargets = [chipsBox, multBox, this._chipsText, this._multText]
|
||||||
.map((obj) => ({ obj, bx: obj.x, by: obj.y }));
|
.map((obj) => ({ obj, bx: obj.x, by: obj.y }));
|
||||||
this.text(X + 16 + W / 2 - 16, cy + 32, '×', 30, C.muted, { ox: 0.5, oy: 0.5 });
|
this.text(X + 16 + W / 2 - 16, cy + 32, '×', 30, C.muted, { ox: 0.5, oy: 0.5 });
|
||||||
this._handNameText = this.text(X + W / 2, cy - 26, '', 20, C.gold ? '#e7c14b' : C.ink, { ox: 0.5 });
|
this._handNameText = this.text(X + W / 2, cy - 60, '', 20, C.gold ? '#e7c14b' : C.ink, { ox: 0.5 });
|
||||||
|
|
||||||
// hands / discards / gold / ante
|
// hands / discards / gold / ante
|
||||||
const iy = cy + 96;
|
const iy = cy + 96;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue