Update spacing of icons upon Name/Tera update (#655)
This change will update the relative position of the Tera, Splice, and Shiny icons when the Name or Tera Type updates. Fixes #618
This commit is contained in:
parent
e39b157767
commit
c6749b1fb4
|
@ -417,7 +417,10 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||||
|
|
||||||
if (nameUpdated || teraTypeUpdated) {
|
if (nameUpdated || teraTypeUpdated) {
|
||||||
this.splicedIcon.setVisible(!!pokemon.fusionSpecies);
|
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.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)) {
|
if (this.lastStatus !== (pokemon.status?.effect || StatusEffect.NONE)) {
|
||||||
|
|
Loading…
Reference in New Issue