Fixed reactive scrolling

This commit is contained in:
frutescens 2024-09-27 21:51:00 -07:00
parent b6bd05f2ac
commit 666526c668

View File

@ -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;