diff --git a/client/src/scenes/constants.js b/client/src/scenes/constants.js index 9b1c86d8..c6734def 100644 --- a/client/src/scenes/constants.js +++ b/client/src/scenes/constants.js @@ -26,7 +26,7 @@ const menuNavigationY = () => Math.floor(CANVAS_HEIGHT() * 0.7); const menuMainWidth = () => Math.floor(CANVAS_WIDTH() * 0.4); const menuMainHeight = () => Math.floor(CANVAS_HEIGHT() * 0.5); -const menuMainX = () => Math.floor(CANVAS_WIDTH() * 0.6); +const menuMainX = () => Math.floor(CANVAS_WIDTH() * 0.65); const menuMainY = () => headerHeight(); const homeMainWidth = () => Math.floor(CANVAS_WIDTH() * 0.6); diff --git a/client/src/scenes/home.cryps.js b/client/src/scenes/home.cryps.js index 74394d10..f112dba1 100644 --- a/client/src/scenes/home.cryps.js +++ b/client/src/scenes/home.cryps.js @@ -5,10 +5,10 @@ const { TEXT, COLOURS, POSITIONS: { CRYP_LIST } } = require('./constants'); const genAvatar = require('./avatar'); const { LineGroup, LineBox } = require('./elements/outline.rotate'); -const ROW_HEIGHT = CRYP_LIST.height() * 0.2; +const ROW_HEIGHT = CRYP_LIST.height() * 0.1; const ROW_WIDTH = CRYP_LIST.width(); -const menuY = CRYP_LIST.height() * 1.6; +const menuY = CRYP_LIST.height() * 0.8; const KEY_MAP = [ 'keydown-ONE', diff --git a/client/src/scenes/statsheet.js b/client/src/scenes/statsheet.js index a34fbcc1..ebf12cc3 100644 --- a/client/src/scenes/statsheet.js +++ b/client/src/scenes/statsheet.js @@ -44,8 +44,10 @@ class StatSheet extends Phaser.Scene { updateData(parent, key, data) { - if (key === 'cryps') { - const cryp = data.find(c => c.id === this.cryp.id); + if (key === 'player') { + console.log('grep'); + console.log(data); + const cryp = data.cryps.find(c => c.id === this.cryp.id); this.scene.restart(cryp); } } @@ -83,7 +85,6 @@ class StatSheet extends Phaser.Scene { ]; CRYP_STATS.forEach(crypStat); - this.add.text(X + WIDTH * 0.175, Y, 'Skills', TEXT.HEADER); const knownSkill = (skill, i) => { const SKILL_X = X + WIDTH * 0.4 + WIDTH * 0.125 * i; const SKILL_Y = Y + HEIGHT * 0.15; @@ -126,6 +127,7 @@ class StatSheet extends Phaser.Scene { } return true; }); + return this; } displaySkillText(x, y, description, pointer) {