From 4e6164943c78588c6a830d73854d295bf4fe20fe Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sun, 23 Apr 2023 15:13:21 -0400 Subject: [PATCH] Add PP to move summary --- public/images/ui/summary_moves.png | Bin 1249 -> 1304 bytes public/images/ui/summary_moves_cursor.json | 14 ++++---- public/images/ui/summary_moves_cursor.png | Bin 154 -> 166 bytes .../images/ui/summary_moves_overlay_row.png | Bin 205 -> 209 bytes public/images/ui/summary_profile.png | Bin 1377 -> 1507 bytes src/ui/summary-ui-handler.ts | 32 +++++++++++++++--- 6 files changed, 35 insertions(+), 11 deletions(-) diff --git a/public/images/ui/summary_moves.png b/public/images/ui/summary_moves.png index b95755686b77719250f0dd238020d7913de88d78..54ddf0fb2c72bfb02b91c8ced4253168007b95ce 100644 GIT binary patch literal 1304 zcmeAS@N?(olHy`uVBq!ia0vp^*MN9F2OE%V-J;&bz`%0f)5S5Q;?~={3#)F$$Q*cB zzkfNCWM|JCRUai~^>R)RmFWVKCsjj~l$FalC%d~Tz5doIHj5=F%F8O!+(N#yHoF;CUC+(dpRvk* z-nH2?+E?uG`9HV1xjk)maN0hb)QQV=!tAH-&1ir8;c5Ds?Pq*;-_)I#zH|DcIqOeH zw0S%3%Z$k9+8`w_%{F@#y*8`f?A1PX={T;k!;yN=1iL$o)}E_6 z$tf;>?SspGJ%0U%yEX@Y-}&}Ngn@o8yWZJ%@o^>g$7hMno)J2`epm9!Z#&PHPZQ@4 z-#GuQQunsHe>J6Fir2)~2Z{VNQCjxDr2X}x(z4p*{^t)w-#oWk-1J^UuY@WPzN1ynQw27|K&#NDAZx73Rt@G}^QT^^e#{1XT{J$&8 zLWBe1{yF${muz*C6n}ref4s+R{^{)TA+wkN6R*(||2$*;>AfE}KHrvnIJYlbs^gZ?itRYU0PWkksV9(|ljg z&+gmyw?Cbz>(wn!-<6y3VdeXcr?NyVPbv9FuBp?jR)1RXCt$^N8|9u@x1?jgrc8bx zU~u>53)A&~Qn%hZE788~=e@7~a~E!(zT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}T4~t$Y9eXnQ)wes8|Ww9im%{mUP{8|BmI zA1<@Dg{8bBfrqaitzNk)Y|3B2aZhz-!ls=ZBYc-=Y8LvN-PvFVdQ&MBb@0NchQ ARR910 diff --git a/public/images/ui/summary_moves_cursor.json b/public/images/ui/summary_moves_cursor.json index dc391a564..0a313153c 100644 --- a/public/images/ui/summary_moves_cursor.json +++ b/public/images/ui/summary_moves_cursor.json @@ -4,7 +4,7 @@ "image": "summary_moves_cursor.png", "format": "RGBA8888", "size": { - "w": 156, + "w": 208, "h": 32 }, "scale": 1, @@ -14,19 +14,19 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 146, + "w": 208, "h": 16 }, "spriteSourceSize": { "x": 0, "y": 0, - "w": 156, + "w": 208, "h": 16 }, "frame": { "x": 0, "y": 0, - "w": 156, + "w": 208, "h": 16 } }, @@ -35,19 +35,19 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 156, + "w": 208, "h": 16 }, "spriteSourceSize": { "x": 0, "y": 0, - "w": 156, + "w": 208, "h": 16 }, "frame": { "x": 0, "y": 16, - "w": 156, + "w": 208, "h": 16 } } diff --git a/public/images/ui/summary_moves_cursor.png b/public/images/ui/summary_moves_cursor.png index ca06318e2c42f6fbbefed81e7ad1ddd6800cfbb2..6b8314b66ca660985ff104967ead4df02a693c00 100644 GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^7l2rSg&9arlz1Hnr1%4TLR@b8)9{WVokm z9uJViSQ6wH%;50sMjDV~a>ju~FiH{i?iRL&S3j3^P6z@dPH4@e2faPS>$ zgis&D4{m+q(-^wt4a@OU2YDmA=WnZt+NRmIX6YV2zrQB(`rp^@XP9RFrGNg8=WqA) fD`t0gR4`53s(8Uv%_|D%3Ir1W^7suIj~&}~&hFVg`^V?rf4=ved+zsq@6EH$b}~>HR6;^R z=CnQPoVX8)DVN+WuGj0evn3=TPfw$4&{szUqZ+Xj80FOWMC880Li>wa3SM4bH>-0{ zi{I1g`=*@F4NalR9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Z#Z(&W(7SrDx-<^!n#h#3+CNx-iTpPb3KkKBu;n9Lu%;=*SMTW znB|P+`8K*TuEpjzlwReykj}bwI}|J0wi4yskAf?#vBRx}BxR46%RdJo$3e-riZ zNq@=X7i6#Fv5a)u# diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index e7547149a..30df0407b 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -322,10 +322,10 @@ export default class SummaryUiHandler extends UiHandler { this.moveCursorObj.setVisible(true); this.moveCursorBlinkTimer = this.scene.time.addEvent({ loop: true, - delay: 600, + delay: new Utils.FixedInt(600) as unknown as integer, callback: () => { this.moveCursorObj.setVisible(false); - this.scene.time.delayedCall(100, () => { + this.scene.time.delayedCall(new Utils.FixedInt(100) as unknown as integer, () => { if (!this.moveCursorObj) return; this.moveCursorObj.setVisible(true); @@ -414,6 +414,15 @@ export default class SummaryUiHandler extends UiHandler { const newMoveTypeIcon = this.scene.add.sprite(0, 0, 'types', Type[this.newMove.type].toLowerCase()); newMoveTypeIcon.setOrigin(0, 1); this.extraMoveRowContainer.add(newMoveTypeIcon); + + const ppOverlay = this.scene.add.image(163, -1, 'summary_moves_overlay_pp'); + ppOverlay.setOrigin(0, 1); + this.extraMoveRowContainer.add(ppOverlay); + + const pp = Utils.padInt(this.newMove.pp, 2, ' '); + const ppText = addTextObject(this.scene, 173, 1, `${pp}/${pp}`, TextStyle.WINDOW); + ppText.setOrigin(0, 1); + this.extraMoveRowContainer.add(ppText); } this.moveRowsContainer = this.scene.add.container(0, 0); @@ -433,16 +442,31 @@ export default class SummaryUiHandler extends UiHandler { const moveText = addTextObject(this.scene, 35, 0, move ? move.getName() : '-', TextStyle.SUMMARY); moveText.setOrigin(0, 1); moveRowContainer.add(moveText); + + const ppOverlay = this.scene.add.image(163, -1, 'summary_moves_overlay_pp'); + ppOverlay.setOrigin(0, 1); + moveRowContainer.add(ppOverlay); + + const ppText = addTextObject(this.scene, 173, 1, '--/--', TextStyle.WINDOW); + ppText.setOrigin(0, 1); + + if (move) { + const maxPP = move.getMove().pp + move.ppUp; + const pp = maxPP - move.ppUsed; + ppText.setText(`${Utils.padInt(pp, 2, ' ')}/${Utils.padInt(maxPP, 2, ' ')}`); + } + + moveRowContainer.add(ppText); } - this.moveDescriptionText = addTextObject(this.scene, 2, 84, '', TextStyle.WINDOW, { wordWrap: { width: 900 } }); + this.moveDescriptionText = addTextObject(this.scene, 2, 84, '', TextStyle.WINDOW, { wordWrap: { width: 1212 } }); this.movesContainer.add(this.moveDescriptionText); const maskRect = this.scene.make.graphics({}); maskRect.setScale(6); maskRect.fillStyle(0xFFFFFF); maskRect.beginPath(); - maskRect.fillRect(112, 130, 150, 46); + maskRect.fillRect(112, 130, 202, 46); const moveDescriptionTextMask = maskRect.createGeometryMask();