Merge pull request #1186 from thecodingmachine/customSceneNewArrow

CustomizeScene buttons use moveHorizontally and moveVertically
This commit is contained in:
David Négrier 2021-06-15 11:38:48 +02:00 committed by GitHub
commit cbc80391d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,15 @@ export class CustomizeScene extends AbstractCharacterScene {
this.onResize(); 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; this.selectedLayers[this.activeRow] += index;
if (this.selectedLayers[this.activeRow] < 0) { if (this.selectedLayers[this.activeRow] < 0) {
this.selectedLayers[this.activeRow] = 0 this.selectedLayers[this.activeRow] = 0
@ -123,7 +131,7 @@ export class CustomizeScene extends AbstractCharacterScene {
this.saveInLocalStorage(); this.saveInLocalStorage();
} }
public doMoveCursorVertically(index:number): void { private doMoveCursorVertically(index:number): void {
this.activeRow += index; this.activeRow += index;
if (this.activeRow < 0) { if (this.activeRow < 0) {