From 09da69c24af786b97c81b3b88d82cdb66f17c1f2 Mon Sep 17 00:00:00 2001 From: GRL Date: Tue, 15 Jun 2021 11:16:44 +0200 Subject: [PATCH] CustomizeScene buttons use moveHorizontally and moveVertically --- front/src/Phaser/Login/CustomizeScene.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/front/src/Phaser/Login/CustomizeScene.ts b/front/src/Phaser/Login/CustomizeScene.ts index f1d48235..4c19d944 100644 --- a/front/src/Phaser/Login/CustomizeScene.ts +++ b/front/src/Phaser/Login/CustomizeScene.ts @@ -111,7 +111,15 @@ export class CustomizeScene extends AbstractCharacterScene { this.onResize(); } - public doMoveCursorHorizontally(index: number): void { + public moveCursorHorizontally(index: number): void { + this.moveHorizontally = index; + } + + public moveCursorVertically(index: number): void { + this.moveVertically = index; + } + + private doMoveCursorHorizontally(index: number): void { this.selectedLayers[this.activeRow] += index; if (this.selectedLayers[this.activeRow] < 0) { this.selectedLayers[this.activeRow] = 0 @@ -123,7 +131,7 @@ export class CustomizeScene extends AbstractCharacterScene { this.saveInLocalStorage(); } - public doMoveCursorVertically(index:number): void { + private doMoveCursorVertically(index:number): void { this.activeRow += index; if (this.activeRow < 0) {