Updated rename state management
Some variables that should've been set is not but now is set.pull/558/head
parent
efe35774fe
commit
106b252ef2
|
@ -270,7 +270,6 @@ export default class SummaryUiHandler extends UiHandler {
|
|||
this.pokemon.cry();
|
||||
|
||||
this.nameText.setText(this.pokemon.name);
|
||||
this.newName = this.pokemon.name;
|
||||
|
||||
const isFusion = this.pokemon.isFusion();
|
||||
|
||||
|
@ -345,7 +344,7 @@ export default class SummaryUiHandler extends UiHandler {
|
|||
this.status.setFrame(this.pokemon.status ? StatusEffect[this.pokemon.status.effect].toLowerCase() : 'pokerus');
|
||||
} else
|
||||
this.hideStatus(!fromSummary);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -425,9 +424,10 @@ export default class SummaryUiHandler extends UiHandler {
|
|||
if (button === Button.SUBMIT) {
|
||||
this.pokemon.name = this.newName;
|
||||
this.hideRenamePokemon();
|
||||
success = true;
|
||||
} else if (button === Button.CANCEL) {
|
||||
this.newName = this.pokemon.name;
|
||||
this.hideRenamePokemon();
|
||||
success = true;
|
||||
}
|
||||
} else {
|
||||
if (button === Button.ACTION) {
|
||||
|
@ -924,9 +924,13 @@ export default class SummaryUiHandler extends UiHandler {
|
|||
|
||||
showRenamePokemon() {
|
||||
this.renamePokemon = true;
|
||||
this.newName = this.pokemon.name;
|
||||
this.isCapitalized = true;
|
||||
}
|
||||
hideRenamePokemon() {
|
||||
this.renamePokemon = false;
|
||||
this.newName = this.pokemon.name;
|
||||
this.isCapitalized = true;
|
||||
}
|
||||
|
||||
showMoveSelect() {
|
||||
|
@ -1013,6 +1017,11 @@ export default class SummaryUiHandler extends UiHandler {
|
|||
}
|
||||
this.hideMoveEffect(true);
|
||||
}
|
||||
if (this.renamePokemon) {
|
||||
this.renamePokemon = false;
|
||||
this.newName = this.pokemon.name;
|
||||
this.isCapitalized = true;
|
||||
}
|
||||
this.summaryContainer.setVisible(false);
|
||||
this.summaryPageContainer.setVisible(false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue