diff --git a/client/src/scenes/cryp.row.js b/client/src/scenes/cryp.row.js index 7922c714..1a90922d 100644 --- a/client/src/scenes/cryp.row.js +++ b/client/src/scenes/cryp.row.js @@ -27,15 +27,18 @@ class CrypRow extends Phaser.GameObjects.Group { const X_ORIGIN = xPos(i); const Y_ORIGIN = yPos(i); - // only draw for active cryps - if (cryp.active) { - const row = list.add - .rectangle(X_ORIGIN, Y_ORIGIN, ROW_WIDTH, ROW_HEIGHT, ROW_FILL * Math.random()) - .setInteractive() - .setOrigin(0); - this.add(row); - row.cryp = cryp; - } + const ACTIVE_FILL = cryp.active + ? 1 + : 0; + + const row = list.add + .rectangle(X_ORIGIN, Y_ORIGIN, ROW_WIDTH, ROW_HEIGHT, ROW_FILL * Math.random(), ACTIVE_FILL) + .setInteractive() + .setOrigin(0); + + row.on('pointerdown', () => { + list.displaySkills(cryp); + }); if (KEY_MAP[i]) { this.keyboard.on(KEY_MAP[i], () => { @@ -43,6 +46,8 @@ class CrypRow extends Phaser.GameObjects.Group { }, this); } + row.cryp = cryp; + this.add(row); this.add(list.add.text(X_ORIGIN, Y_ORIGIN + (TEXT_MARGIN * 0), cryp.name, TEXT.HEADER)); this.add(list.add.text(ROW_WIDTH - 20, Y_ORIGIN + (TEXT_MARGIN * 0), i + 1, TEXT.HEADER)); this.add(list.add.text(X_ORIGIN, Y_ORIGIN + (TEXT_MARGIN * 1), cryp.stamina.base, TEXT.NORMAL));