mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-17 15:25:22 +01:00
parent
0fdcb97575
commit
e7404ecfe3
@ -69,22 +69,17 @@ export class RibbonTray extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Button.LEFT:
|
case Button.LEFT:
|
||||||
if (this.trayCursor % this.maxColumns !== 0) {
|
if (this.trayCursor !== 0) {
|
||||||
success = this.setTrayCursor(this.trayCursor - 1);
|
success = this.setTrayCursor(this.trayCursor - 1);
|
||||||
} else {
|
} else {
|
||||||
success = this.setTrayCursor(
|
success = this.setTrayCursor(numberOfIcons - 1);
|
||||||
currentTrayRow < numOfRows - 1 ? (currentTrayRow + 1) * this.maxColumns - 1 : numberOfIcons - 1,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Button.RIGHT:
|
case Button.RIGHT:
|
||||||
if (
|
if (this.trayCursor !== numberOfIcons - 1) {
|
||||||
this.trayCursor % this.maxColumns
|
|
||||||
< (currentTrayRow < numOfRows - 1 ? 8 : (numberOfIcons - 1) % this.maxColumns)
|
|
||||||
) {
|
|
||||||
success = this.setTrayCursor(this.trayCursor + 1);
|
success = this.setTrayCursor(this.trayCursor + 1);
|
||||||
} else {
|
} else {
|
||||||
success = this.setTrayCursor(currentTrayRow * this.maxColumns);
|
success = this.setTrayCursor(0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Button.CANCEL:
|
case Button.CANCEL:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user