From c6af15d9275a3f89129e2ebdb913b66125973f0b Mon Sep 17 00:00:00 2001 From: Reid McInroy Date: Wed, 8 May 2024 16:12:27 -0400 Subject: [PATCH] Update spacing of icons upon Name/Tera update This change will update the relative position of the Tera, Splice, and Shiny icons when the Name or Tera Type updates. Fixes #618 --- src/ui/battle-info.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ui/battle-info.ts b/src/ui/battle-info.ts index 2ca0457c801..f2e48911e07 100644 --- a/src/ui/battle-info.ts +++ b/src/ui/battle-info.ts @@ -417,7 +417,10 @@ export default class BattleInfo extends Phaser.GameObjects.Container { if (nameUpdated || teraTypeUpdated) { this.splicedIcon.setVisible(!!pokemon.fusionSpecies); + + this.teraIcon.setPositionRelative(this.nameText, this.nameText.displayWidth + this.genderText.displayWidth + 1, 2); this.splicedIcon.setPositionRelative(this.nameText, this.nameText.displayWidth + this.genderText.displayWidth + 1 + (this.teraIcon.visible ? this.teraIcon.displayWidth + 1 : 0), 1.5); + this.shinyIcon.setPositionRelative(this.nameText, this.nameText.displayWidth + this.genderText.displayWidth + 1 + (this.teraIcon.visible ? this.teraIcon.displayWidth + 1 : 0) + (this.splicedIcon.visible ? this.splicedIcon.displayWidth + 1 : 0), 2.5); } if (this.lastStatus !== (pokemon.status?.effect || StatusEffect.NONE)) {