From 661e37f54f420bf91dbe690c48998d38e529bec2 Mon Sep 17 00:00:00 2001 From: Alvin Zou <59787978+happinyz@users.noreply.github.com> Date: Sun, 19 May 2024 10:19:38 -0700 Subject: [PATCH] Add capability to view Pokemon Status screen when learning moves (#756) --- src/ui/summary-ui-handler.ts | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index 943679cae39..0655880d271 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -494,20 +494,16 @@ export default class SummaryUiHandler extends UiHandler { } break; case Button.LEFT: - if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE) - break; if (this.cursor) success = this.setCursor(this.cursor - 1); break; case Button.RIGHT: - if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE) { - this.setCursor(Page.MOVES); - this.moveSelect = true; - success = true; - break; - } - if (this.cursor < pages.length - 1) + if (this.cursor < pages.length - 1) { success = this.setCursor(this.cursor + 1); + if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE && this.cursor === Page.MOVES) { + this.moveSelect = true; + } + } break; } } @@ -614,13 +610,7 @@ export default class SummaryUiHandler extends UiHandler { onComplete: () => { if (forward){ this.populatePageContainer(this.summaryPageContainer); - if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE) { - this.moveCursorObj = null; - this.extraMoveRowContainer.setVisible(true); - this.setCursor(0, true); - this.showMoveEffect(); - } - else if (this.cursor===Page.MOVES) { + if (this.cursor===Page.MOVES) { this.moveCursorObj = null; this.showMoveSelect(); this.showMoveEffect();