mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-24 16:29:27 +02:00
Fixed reactive scrolling
This commit is contained in:
parent
b6bd05f2ac
commit
666526c668
@ -150,11 +150,19 @@ export default class SaveSlotSelectUiHandler extends MessageUiHandler {
|
|||||||
} else {
|
} else {
|
||||||
switch (button) {
|
switch (button) {
|
||||||
case Button.UP:
|
case Button.UP:
|
||||||
if (this.cursor) {
|
if (this.cursor < 2) {
|
||||||
this.revertSessionSlot(this.cursor);
|
this.revertSessionSlot(this.cursor);
|
||||||
success = this.setCursor(this.cursor - 1);
|
if (this.cursor === 0) {
|
||||||
} else if (this.scrollCursor) {
|
success = this.setCursor(this.cursor);
|
||||||
this.revertSessionSlot(this.scrollCursor + this.cursor + 1);
|
} else {
|
||||||
|
success = this.setCursor(this.cursor - 1);
|
||||||
|
}
|
||||||
|
} else if (this.scrollCursor === 0 && this.cursor === 2) {
|
||||||
|
this.revertSessionSlot(this.cursor);
|
||||||
|
success = this.setScrollCursor(this.scrollCursor);
|
||||||
|
success = this.setCursor(this.cursor-1);
|
||||||
|
} else if (this.scrollCursor > 0) {
|
||||||
|
this.revertSessionSlot(this.scrollCursor + this.cursor);
|
||||||
success = this.setScrollCursor(this.scrollCursor - 1);
|
success = this.setScrollCursor(this.scrollCursor - 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user