From b77fd1755c8ee551c0c0d9faf59385658dfa6b8b Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Thu, 6 Apr 2023 10:05:12 -0400 Subject: [PATCH] Changes to summary UI --- public/images/ui/summary_bg.png | Bin 1136 -> 1163 bytes public/images/ui/summary_moves.png | Bin 1260 -> 1249 bytes public/images/ui/summary_overlay_shiny.png | Bin 248 -> 288 bytes src/battle-scene.ts | 4 +++ src/ui/party-ui-handler.ts | 4 +-- src/ui/summary-ui-handler.ts | 37 ++++++++++++++++++++- 6 files changed, 42 insertions(+), 3 deletions(-) diff --git a/public/images/ui/summary_bg.png b/public/images/ui/summary_bg.png index fc73304b85492b2eece29a441ea4bcefab4cad13..1cfe3f58f55076d887dbe0cfbf9c0d69e9cc36ff 100644 GIT binary patch literal 1163 zcmeAS@N?(olHy`uVBq!ia0y~yU~~Yow{Wll$)``g3NkRT1bMnRhE&{odv{^+tptW+ z5BuX>Rg8>`HW>+Zu36*a7WU15#TpksKc$H$JW^6rge0$b=EhuST6%j@zxTZ3Yu?Hp z*R#C$@6wu_O?uncH@>)J)BWqu&)P>S23F>L2TN~U^}X_ZefZkR4U9)Pniy5iacnES z^ZfobKc>ZnuLZv7?>~P(W=aM zGN?Sc@3&+^%1@h5sp-#r1teZF=!KnU``}d@U7gHSz-bfIT`4D4Y_7UMyMB+f&&1_@ zCq!4in%m64RWPTn-Z`i-fr0UtT~^B*v0WAREX^`Pa=C(7+`?Eaq9j6w;8uAi98wg?R;osDg%r2$`6bL&Jf1 z%of0?>~2{NH8!t?BWuoY{Mu8DjYr!p&;Fp8Mh0uC_2{j}^}WiJy`RB--WR bUdJ%wT=%YXfm0>`3mFDaS3j3^P6XRC3)JY%WECv5KMm%Z;! z{PyLy!0D*E!Re{lElzXx~Y*H_us&p+78UirGs{l2tft-SqNDfMoR9h^oDi_04i|Be^^ zG`GAlzOH_s77OzUfxbJ8cC6(Mg`8&++GO?%G<`hGV07Wfk2a13hTi!fn}cWQY>u~M zx7hF}>%r-BXUrWH{HDK7eXLP)VOQSaT{mkUuHPZ`jsJ;igLlHOSx++~Vs=I{q{lbx z&KIeC)$t|Z>f6%-X_xi&932?{71Y}YoT)j$zzj5+@t8?N_Zzj4@BaDwcnw}L)l^g% zR2_Ix^XorLWQzIi`O{M+yLRtf%-OS^;q)e(h{n`NtEK}x*bB;87#B%9OyA+Kg}LIz zq;Nr|=Wp)LR@l8b{Lb0!`M>|j8~kFdseSo6NTTDDkc7f2CLYC>Mc&Rvx{Is~?k?jB zy;RleaAo>|*j=(MH$-BySQMWz_N@K$E%?L5)htP}2P96vzu(Ugr?P-SRDsr5!hv-K z!$Afu2UZTY07fl`fCerBT4SCCOd$;k45AB|SeRD;{Rno0BhYe%LySE;nHI~}choYh zUc&3T#5q89Z8*n~xP~?ciN)OQ4AAt&B;f#wJ|2YzMiz1e4=@mE#)q1aQfViS#J|to zAK1jo{p$9$f1UPN;Xnl2gn5UFVdQ&MBb@0Q7Q{Bme*a diff --git a/public/images/ui/summary_moves.png b/public/images/ui/summary_moves.png index bf5111e4a03dd0a1a6bb8c725302dc1389c593b5..b95755686b77719250f0dd238020d7913de88d78 100644 GIT binary patch delta 1061 zcmV+=1ls%T3E>HlB!8$$L_t(|+U?yhnwvlXhVd_bB9KVr$Q+?E5?R?JAdwsaiR1{8 zkx1kop>iY=8P|#|>@YyG+07r4zCV*?LMbJ02a-MwD@lsCKmQ7Nkg9%Lt%wjyuyz-M zy5@-BZVub+I7C0fNQdKNa9lS2axmPev7xdwQL@iR%f^QNdVlWN)cSc*j&}Iec3y=& z9$q!?k5<88xl!<&&Yt?1MNh?? z>~m$})J%xC2!FPiAM*n+76yy|1T@<=ZI0t6UFV*{DJV?e`%t)oe%L@ zrgyyFr34{jc_9LiLX+G9CX-GC5tEMs1_dBQ5F$X6!2v8wi2ou)TLl~u+=bs7A!2zU zHdUy~HXJ3~RAn1ARX7-1`z!4>Ms?h3TeOS%8-p`1Zu}e*NS%giDl-~iPp#Zkp>~^) zSNDm$@va$@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f}}ww=G{oc+76 z-Er@6s_ei1ZhW{>h?2e@l)^LKDaPY}cH1gdJ{eytJvjfxwmrw?+a9i@U6^?A=ZJYx z%GglGhAMxrM-QSqJ{R^QuQrb_QT8j++?+q%|GQU!?kNQx zJjA(6ps}G+lTR**zUPv|=ZM{der%<5i%38?m6)dUl|YQQFfb^l@M=u`8{^up%*B_vEjBajAOwZdWC(;ak^s! z`ZJ3pe*2K5psxGD=mCDf9TxUCT)9xp`TUXu_49+Qs(4U^sh8Gj%|5F$W`AVh!= zL5Kh$f)D{h#8ZZ7tAI0tn{ZnrL_A)IO%F!Z?7NZZE_HBxEPtt zI3-bY%EqN{CkibS@xHNG_Q6q!qz@dkUsRhP%2li9xcGb1wy^6JKWm;vOz-HZoOk%b z@f~&57k__>^GI`ByH?`5BWudDJl2_+PU$)cyII(D4|GcIY1lh?afh(oq1y|u-}1`d zxa$jbc4`$#BVBlh4ZD4X>T)+^(pur$Q4etJfL>HlFO0w0?LU7{RVgWQ+KQ4d z8(*)NfBmb1f6~m0zcZGLPM8@lnv&M5ULdnD>OJE*uRre@_f1@{@TkgW*Y}IZIwGI` z^{&4CZBA%@o@oDdMJ5h~1_mY$0Y)VUmJS9%1tymU{G10mp>heg=WPy^dsw!6yZA@N W&7Tj-s|W+V!r { 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); } }