Add capability to view Pokemon Status screen when learning moves (#756)

This commit is contained in:
Alvin Zou 2024-05-19 10:19:38 -07:00 committed by GitHub
parent 1bc6fcf4de
commit 661e37f54f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 16 deletions

View File

@ -494,20 +494,16 @@ export default class SummaryUiHandler extends UiHandler {
} }
break; break;
case Button.LEFT: case Button.LEFT:
if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE)
break;
if (this.cursor) if (this.cursor)
success = this.setCursor(this.cursor - 1); success = this.setCursor(this.cursor - 1);
break; break;
case Button.RIGHT: case Button.RIGHT:
if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE) { if (this.cursor < pages.length - 1) {
this.setCursor(Page.MOVES);
this.moveSelect = true;
success = true;
break;
}
if (this.cursor < pages.length - 1)
success = this.setCursor(this.cursor + 1); success = this.setCursor(this.cursor + 1);
if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE && this.cursor === Page.MOVES) {
this.moveSelect = true;
}
}
break; break;
} }
} }
@ -614,13 +610,7 @@ export default class SummaryUiHandler extends UiHandler {
onComplete: () => { onComplete: () => {
if (forward){ if (forward){
this.populatePageContainer(this.summaryPageContainer); this.populatePageContainer(this.summaryPageContainer);
if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE) { if (this.cursor===Page.MOVES) {
this.moveCursorObj = null;
this.extraMoveRowContainer.setVisible(true);
this.setCursor(0, true);
this.showMoveEffect();
}
else if (this.cursor===Page.MOVES) {
this.moveCursorObj = null; this.moveCursorObj = null;
this.showMoveSelect(); this.showMoveSelect();
this.showMoveEffect(); this.showMoveEffect();