diff --git a/client/src/scenes/constants.js b/client/src/scenes/constants.js index c64f16b7..9241c3dc 100644 --- a/client/src/scenes/constants.js +++ b/client/src/scenes/constants.js @@ -56,6 +56,7 @@ module.exports = { NORMAL: { fontFamily: 'Jura', fontSize: 18, color: '#ffffff' }, LEARNABLE: { fontFamily: 'Jura', fontSize: 18, color: '#ffffff' }, HEADER: { fontFamily: 'Jura', fontSize: 24, color: '#ffffff', fontStyle: 'bold' }, + HOVER: { fontFamily: 'Jura', fontSize: 16, color: '#ffffff', backgroundColor: '#222222' }, }, POSITIONS: { diff --git a/client/src/scenes/cryps.js b/client/src/scenes/cryps.js old mode 100755 new mode 100644 diff --git a/client/src/scenes/specsheet.js b/client/src/scenes/specsheet.js index b0dca8e3..c2e86c10 100644 --- a/client/src/scenes/specsheet.js +++ b/client/src/scenes/specsheet.js @@ -81,12 +81,7 @@ class StatSheet extends Phaser.Scene { displayText(x, y, description, pointer) { if (this.hoverText) this.hoverText.destroy(); - this.hoverText = this.add.text(x, y, description, { - fontSize: '16px', - fontFamily: 'Jura', - color: '#ffffff', - backgroundColor: '#222222', - }).setPadding(32); + this.hoverText = this.add.text(x, y, description, TEXT.HOVER).setPadding(32); this.hoverText.setAlpha(0.8); this.hoverText.setOrigin(pointer.x >= WIDTH * 0.65 ? 0 : 1, pointer.y >= HEIGHT * 0.25 ? 1 : 0); diff --git a/client/src/scenes/statsheet.js b/client/src/scenes/statsheet.js index 6975c393..11091ca1 100644 --- a/client/src/scenes/statsheet.js +++ b/client/src/scenes/statsheet.js @@ -86,9 +86,7 @@ class StatSheet extends Phaser.Scene { const SKILL_X = menuX; const SKILL_Y = (i * TEXT_MARGIN) + Y_SKILLS + TEXT_MARGIN; - const color = this.forget ? '#ff0000' : '#ffffff'; - const style = { fontFamily: 'monospace', fontSize: 16, color }; - this.knownSkills.add(this.add.text(menuX, SKILL_Y, skill.skill, style) + this.knownSkills.add(this.add.text(SKILL_X, SKILL_Y, skill.skill, TEXT.NORMAL) .setInteractive() .on('pointerdown', () => { this.registry.get('ws').sendCrypForget(cryp.id, skill.skill); @@ -125,12 +123,7 @@ class StatSheet extends Phaser.Scene { displaySkillText(x, y, description, pointer) { if (this.skillText) this.skillText.destroy(); - this.skillText = this.add.text(x, y, description, { - fontSize: '16px', - fontFamily: 'Arial', - color: '#ffffff', - backgroundColor: '#222222', - }).setPadding(32); + this.skillText = this.add.text(x, y, description, TEXT.HOVER).setPadding(32); this.skillText.setAlpha(0.8); this.skillText.setOrigin(pointer.x >= WIDTH * 0.65 ? 1 : 0, pointer.y >= HEIGHT * 0.25 ? 1 : 0); diff --git a/client/src/scenes/zones.js b/client/src/scenes/zones.js index 2fa2d70a..f8ba8cc4 100644 --- a/client/src/scenes/zones.js +++ b/client/src/scenes/zones.js @@ -1,7 +1,7 @@ const Phaser = require('phaser'); const Node = require('./zone.node'); const ZoneControls = require('./zone.controls'); -const { POSITIONS: { MENU_MAIN } } = require('./constants'); +const { POSITIONS: { MENU_MAIN }, TEXT } = require('./constants'); const X = MENU_MAIN.x(); const Y = MENU_MAIN.y(); @@ -104,12 +104,7 @@ class Zones extends Phaser.Scene { displayNodeText(node, pointer) { if (this.nodeText) this.nodeText.destroy(); - this.nodeText = this.add.text(node.x, node.y, node.text, { - fontSize: '24px', - fontFamily: 'Arial', - color: '#ffffff', - backgroundColor: '#222222', - }).setPadding(32); + this.nodeText = this.add.text(node.x, node.y, node.text, TEXT.HOVER).setPadding(32); this.nodeText.setAlpha(0.8); this.nodeText.setOrigin(pointer.x >= WIDTH * 0.65 ? 1 : 0, pointer.y >= HEIGHT * 0.25 ? 1 : 0);