Text alignment
This commit is contained in:
parent
651ef51633
commit
f83b8e72e9
|
|
@ -164,16 +164,16 @@ export default class BattleshipGame extends Phaser.Scene {
|
||||||
|
|
||||||
// Coordinate labels.
|
// Coordinate labels.
|
||||||
for (let c = 0; c < SIZE; c++)
|
for (let c = 0; c < SIZE; c++)
|
||||||
this.add.text(ox + c * CELL + CELL / 2, oy - 4, String.fromCharCode(65 + c), {
|
this.add.text(ox + c * CELL + CELL / 2, oy - 19, String.fromCharCode(65 + c), {
|
||||||
fontFamily: '"Julius Sans One"', fontSize: '16px', color: COLORS.mutedHex,
|
fontFamily: '"Julius Sans One"', fontSize: '16px', color: COLORS.mutedHex,
|
||||||
}).setOrigin(0.5, 1).setDepth(DEPTH.label);
|
}).setOrigin(0.5, 1).setDepth(DEPTH.label);
|
||||||
for (let r = 0; r < SIZE; r++)
|
for (let r = 0; r < SIZE; r++)
|
||||||
this.add.text(ox - 10, oy + r * CELL + CELL / 2, String(r + 1), {
|
this.add.text(ox - 25, oy + r * CELL + CELL / 2, String(r + 1), {
|
||||||
fontFamily: '"Julius Sans One"', fontSize: '16px', color: COLORS.mutedHex,
|
fontFamily: '"Julius Sans One"', fontSize: '16px', color: COLORS.mutedHex,
|
||||||
}).setOrigin(1, 0.5).setDepth(DEPTH.label);
|
}).setOrigin(1, 0.5).setDepth(DEPTH.label);
|
||||||
|
|
||||||
// Title.
|
// Title.
|
||||||
this.add.text(ox + GRID / 2, oy - 40, title, {
|
this.add.text(ox + GRID / 2, oy - 60, title, {
|
||||||
fontFamily: 'Righteous', fontSize: '30px', color: COLORS.textHex,
|
fontFamily: 'Righteous', fontSize: '30px', color: COLORS.textHex,
|
||||||
}).setOrigin(0.5).setDepth(DEPTH.label);
|
}).setOrigin(0.5).setDepth(DEPTH.label);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue