diff --git a/public/images/ui/legacy/party_discard.json b/public/images/ui/legacy/party_discard.json index 308fe51cee3..f6ba017cdf5 100644 --- a/public/images/ui/legacy/party_discard.json +++ b/public/images/ui/legacy/party_discard.json @@ -4,8 +4,8 @@ "image": "party_discard.png", "format": "RGBA8888", "size": { - "w": 75, - "h": 46 + "w": 52, + "h": 32 }, "scale": 1, "frames": [ @@ -14,20 +14,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 75, - "h": 23 + "w": 52, + "h": 16 }, "spriteSourceSize": { "x": 0, "y": 0, - "w": 75, - "h": 23 + "w": 52, + "h": 16 }, "frame": { "x": 0, "y": 0, - "w": 75, - "h": 23 + "w": 52, + "h": 16 } }, { @@ -35,20 +35,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 75, - "h": 23 + "w": 52, + "h": 16 }, "spriteSourceSize": { "x": 0, "y": 0, - "w": 75, - "h": 23 + "w": 52, + "h": 16 }, "frame": { "x": 0, - "y": 23, - "w": 75, - "h": 23 + "y": 16, + "w": 52, + "h": 16 } } ] diff --git a/public/images/ui/legacy/party_discard.png b/public/images/ui/legacy/party_discard.png index 6e3dc638b71..4219c8d33c4 100644 Binary files a/public/images/ui/legacy/party_discard.png and b/public/images/ui/legacy/party_discard.png differ diff --git a/public/images/ui/legacy/party_transfer.json b/public/images/ui/legacy/party_transfer.json index 308fe51cee3..04b7c423012 100644 --- a/public/images/ui/legacy/party_transfer.json +++ b/public/images/ui/legacy/party_transfer.json @@ -1,11 +1,11 @@ { "textures": [ { - "image": "party_discard.png", + "image": "party_transfer.png", "format": "RGBA8888", "size": { - "w": 75, - "h": 46 + "w": 52, + "h": 32 }, "scale": 1, "frames": [ @@ -14,20 +14,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 75, - "h": 23 + "w": 52, + "h": 16 }, "spriteSourceSize": { "x": 0, "y": 0, - "w": 75, - "h": 23 + "w": 52, + "h": 16 }, "frame": { "x": 0, "y": 0, - "w": 75, - "h": 23 + "w": 52, + "h": 16 } }, { @@ -35,20 +35,20 @@ "rotated": false, "trimmed": false, "sourceSize": { - "w": 75, - "h": 23 + "w": 52, + "h": 16 }, "spriteSourceSize": { "x": 0, "y": 0, - "w": 75, - "h": 23 + "w": 52, + "h": 16 }, "frame": { "x": 0, - "y": 23, - "w": 75, - "h": 23 + "y": 16, + "w": 52, + "h": 16 } } ] diff --git a/public/images/ui/legacy/party_transfer.png b/public/images/ui/legacy/party_transfer.png index 177e1139fde..4219c8d33c4 100644 Binary files a/public/images/ui/legacy/party_transfer.png and b/public/images/ui/legacy/party_transfer.png differ diff --git a/public/images/ui/party_transfer.json b/public/images/ui/party_transfer.json index 308fe51cee3..a9d0e66c9c8 100644 --- a/public/images/ui/party_transfer.json +++ b/public/images/ui/party_transfer.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "party_discard.png", + "image": "party_transfer.png", "format": "RGBA8888", "size": { "w": 75, diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index 52fe3992e60..ca68759e71b 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -314,6 +314,7 @@ export default class PartyUiHandler extends MessageUiHandler { this.iconAnimHandler.setup(); const partyDiscardModeButton = new PartyDiscardModeButton(60, -globalScene.game.canvas.height / 15 - 1); + partyContainer.add(partyDiscardModeButton); this.PartyDiscardModeButton = partyDiscardModeButton; @@ -1046,9 +1047,17 @@ export default class PartyUiHandler extends MessageUiHandler { let success = false; switch (button) { case Button.UP: - if (this.cursor === 7 && this.isItemManageMode()) { - success = this.setCursor(0); - break; + if (this.cursor === 1) { + if (this.isItemManageMode()) { + success = this.setCursor(7); + break; + } + } + if (this.cursor === 7) { + if (this.isItemManageMode()) { + success = this.setCursor(0); + break; + } } success = this.setCursor(this.cursor ? (this.cursor < 6 ? this.cursor - 1 : slotCount - 1) : 6); break; @@ -1059,6 +1068,12 @@ export default class PartyUiHandler extends MessageUiHandler { break; } } + if (this.cursor === 7) { + if (this.isItemManageMode()) { + success = this.setCursor(1); + break; + } + } success = this.setCursor(this.cursor < 6 ? (this.cursor < slotCount - 1 ? this.cursor + 1 : 6) : 0); break; case Button.LEFT: @@ -1750,7 +1765,7 @@ class PartySlot extends Phaser.GameObjects.Container { ? -184 + (globalScene.currentBattle.double ? -40 : 0) + (28 + (globalScene.currentBattle.double ? 8 : 0)) * slotIndex - : -124 + (globalScene.currentBattle.double ? -8 : 0) + slotIndex * 64, + : -124 + (globalScene.currentBattle.double ? -20 : 0) + slotIndex * 76, ); this.slotIndex = slotIndex; @@ -2006,7 +2021,6 @@ class PartySlot extends Phaser.GameObjects.Container { class PartyCancelButton extends Phaser.GameObjects.Container { private selected: boolean; - private partyCancelBg: Phaser.GameObjects.Sprite; private partyCancelPb: Phaser.GameObjects.Sprite; @@ -2015,7 +2029,6 @@ class PartyCancelButton extends Phaser.GameObjects.Container { this.setup(); } - setup() { const partyCancelBg = globalScene.add.sprite(0, 0, "party_cancel"); this.add(partyCancelBg); @@ -2059,6 +2072,7 @@ class PartyDiscardModeButton extends Phaser.GameObjects.Container { private transferIcon: Phaser.GameObjects.Sprite; private discardIcon: Phaser.GameObjects.Sprite; + private partyDiscardPb: Phaser.GameObjects.Sprite; private textBox: Phaser.GameObjects.Text; constructor(x: number, y: number) { @@ -2068,12 +2082,14 @@ class PartyDiscardModeButton extends Phaser.GameObjects.Container { } setup() { - this.transferIcon = globalScene.add.sprite(0, 0, "party_transfer", "normal"); - this.discardIcon = globalScene.add.sprite(0, 0, "party_discard", "normal"); + this.transferIcon = globalScene.add.sprite(0, 0, "party_transfer"); + this.discardIcon = globalScene.add.sprite(0, 0, "party_discard"); + this.partyDiscardPb = globalScene.add.sprite(-20, 0, "party_pb"); this.textBox = addTextObject(-8, -7, i18next.t("partyUiHandler:TRANSFER"), TextStyle.PARTY); this.add(this.transferIcon); this.add(this.discardIcon); + this.add(this.partyDiscardPb); this.add(this.textBox); this.clear(); @@ -2088,6 +2104,7 @@ class PartyDiscardModeButton extends Phaser.GameObjects.Container { this.transferIcon.setFrame("selected"); this.discardIcon.setFrame("selected"); + this.partyDiscardPb.setFrame("party_pb_sel"); } deselect() { @@ -2099,6 +2116,7 @@ class PartyDiscardModeButton extends Phaser.GameObjects.Container { this.transferIcon.setFrame("normal"); this.discardIcon.setFrame("normal"); + this.partyDiscardPb.setFrame("party_pb"); } toggleIcon(partyMode: number) { @@ -2108,6 +2126,10 @@ class PartyDiscardModeButton extends Phaser.GameObjects.Container { this.discardIcon.setVisible(false); this.textBox.setVisible(true); this.textBox.setText(i18next.t("partyUiHandler:TRANSFER")); + this.setPosition( + globalScene.currentBattle.double ? 64 : 60, + globalScene.currentBattle.double ? -106 : -globalScene.game.canvas.height / 15 - 1, + ); this.transferIcon.displayWidth = this.textBox.text.length * 9 + 3; break; case PartyUiMode.MODIFIER_TRANSFER: @@ -2115,6 +2137,10 @@ class PartyDiscardModeButton extends Phaser.GameObjects.Container { this.discardIcon.setVisible(true); this.textBox.setVisible(true); this.textBox.setText("Discard"); + this.setPosition( + globalScene.currentBattle.double ? 64 : 60, + globalScene.currentBattle.double ? -106 : -globalScene.game.canvas.height / 15 - 1, + ); this.discardIcon.displayWidth = this.textBox.text.length * 9 + 3; break; default: