diff --git a/public/images/ui/summary_bg.png b/public/images/ui/summary_bg.png index fc73304b8..1cfe3f58f 100644 Binary files a/public/images/ui/summary_bg.png and b/public/images/ui/summary_bg.png differ diff --git a/public/images/ui/summary_moves.png b/public/images/ui/summary_moves.png index bf5111e4a..b95755686 100644 Binary files a/public/images/ui/summary_moves.png and b/public/images/ui/summary_moves.png differ diff --git a/public/images/ui/summary_overlay_shiny.png b/public/images/ui/summary_overlay_shiny.png index 6aaacc8cb..0582b2aad 100644 Binary files a/public/images/ui/summary_overlay_shiny.png and b/public/images/ui/summary_overlay_shiny.png differ diff --git a/src/battle-scene.ts b/src/battle-scene.ts index fd77bcd05..8d131463f 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -134,6 +134,10 @@ export default class BattleScene extends Phaser.Scene { this.loadAtlas('party_cancel', 'ui'); this.loadImage('summary_bg', 'ui'); + this.loadImage('summary_overlay_shiny', 'ui'); + this.loadImage('summary_profile', 'ui'); + this.loadImage('summary_moves', 'ui'); + this.loadImage('summary_moves_effect', 'ui'); // Load arena images Utils.getEnumValues(Biome).map(at => { diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index fed8420c6..9235dce66 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -105,7 +105,7 @@ export default class PartyUiHandler extends MessageUiHandler { } show(args: any[]) { - if (!args.length) + if (!args.length || this.active) return; super.show(args); @@ -172,7 +172,7 @@ export default class PartyUiHandler extends MessageUiHandler { } else if (option === PartyOption.SUMMARY) { this.clearOptions(); ui.playSelect(); - ui.setMode(Mode.SUMMARY); + ui.setModeWithoutClear(Mode.SUMMARY); } else if (option === PartyOption.CANCEL) this.processInput(keyCodes.X); } else if (keyCode === keyCodes.X) { diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index d8044dab3..7d13ce715 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -2,8 +2,17 @@ import BattleScene from "../battle-scene"; import { Mode } from "./ui"; import UiHandler from "./uiHandler"; +enum Page { + PROFILE, + MOVES +} + export default class SummaryUiHandler extends UiHandler { private summaryContainer: Phaser.GameObjects.Container; + private summaryPage: Phaser.GameObjects.Sprite; + private summaryPageTransition: Phaser.GameObjects.Sprite; + + private page: integer; constructor(scene: BattleScene) { super(scene, Mode.SUMMARY); @@ -17,9 +26,29 @@ export default class SummaryUiHandler extends UiHandler { ui.add(this.summaryContainer); const summaryBg = this.scene.add.image(0, 0, 'summary_bg'); + summaryBg.setOrigin(0, 1); this.summaryContainer.add(summaryBg); - summaryBg.setOrigin(0, 1); + this.page = 0; + + this.summaryPage = this.scene.add.sprite(106, 21, this.getPageKey()); + this.summaryPage.setVisible(false); + this.summaryContainer.add(this.summaryPage); + } + + setPage(newPage: integer) { + this.page = newPage; + + if (this.summaryPage.visible) { + + } else { + this.summaryPage.setTexture(this.getPageKey()); + this.summaryPage.setVisible(true); + } + } + + getPageKey() { + return `summary_${Page[this.page].toLowerCase()}`; } show(args: any[]) { @@ -31,6 +60,11 @@ export default class SummaryUiHandler extends UiHandler { processInput(keyCode: integer) { const ui = this.getUi(); const keyCodes = Phaser.Input.Keyboard.KeyCodes; + + if (keyCode === keyCodes.X) { + ui.setMode(Mode.PARTY); + ui.playSelect(); + } } setCursor(cursor: integer): boolean { @@ -44,5 +78,6 @@ export default class SummaryUiHandler extends UiHandler { clear() { super.clear(); this.summaryContainer.setVisible(false); + this.summaryPage.setVisible(false); } }