From 5010793a32b64709f4ab4c24bbf9c60dfbd462cc Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Thu, 4 Apr 2024 16:19:45 -0400 Subject: [PATCH] Add starter select screen cursor wraparound --- src/ui/starter-select-ui-handler.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index b5ae4f4e4..2b0f4e2ae 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -533,6 +533,12 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.setGenMode(true); success = true; break; + case Button.LEFT: + this.startCursorObj.setVisible(false); + this.setGenMode(false); + this.setCursor(this.cursor + 8); + success = true; + break; case Button.RIGHT: this.startCursorObj.setVisible(false); this.setGenMode(false); @@ -554,6 +560,10 @@ export default class StarterSelectUiHandler extends MessageUiHandler { success = true; } break; + case Button.LEFT: + success = this.setGenMode(false); + this.setCursor(this.cursor + 8); + break; case Button.RIGHT: success = this.setGenMode(false); break; @@ -770,6 +780,11 @@ export default class StarterSelectUiHandler extends MessageUiHandler { case Button.RIGHT: if (this.cursor % 9 < (row < rows - 1 ? 8 : (genStarters - 1) % 9)) success = this.setCursor(this.cursor + 1); + else { + if (row >= Math.min(5, rows - 1)) + this.startCursorObj.setVisible(true); + success = this.setGenMode(true); + } break; } }