From 7f03d1ecdf0c01359f9701b81e5886798d99de8b Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 27 Apr 2024 16:12:00 +0200 Subject: [PATCH] bug fix: updates move description correctly viewing the description of move slot 1 in a pokemon's move summary UI only updated the first time it was viewed per session, exiting the party UI and re-entering caused the moves in a pokemon's summary screen to not automatically populate the description box unless you moved the cursor down to move 2 and then back up to move 1 --- src/ui/summary-ui-handler.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index 44003a7c8fc..d8fa4af91e8 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -426,11 +426,9 @@ export default class SummaryUiHandler extends UiHandler { } setCursor(cursor: integer, overrideChanged: boolean = false): boolean { - let changed: boolean; + let changed: boolean = overrideChanged || this.moveCursor !== cursor; if (this.moveSelect) { - changed = overrideChanged || this.moveCursor !== cursor; - if (changed) { this.moveCursor = cursor; const selectedMove = this.getSelectedMove(); @@ -462,7 +460,6 @@ export default class SummaryUiHandler extends UiHandler { y: `-=${14.83 * (moveDescriptionLineCount - 3)}` }); } - } if (!this.moveCursorObj) { this.moveCursorObj = this.scene.add.sprite(-2, 0, 'summary_moves_cursor', 'highlight');