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.pokemon.cry();
|
||||||
|
|
||||||
this.nameText.setText(this.pokemon.name);
|
this.nameText.setText(this.pokemon.name);
|
||||||
this.newName = this.pokemon.name;
|
|
||||||
|
|
||||||
const isFusion = this.pokemon.isFusion();
|
const isFusion = this.pokemon.isFusion();
|
||||||
|
|
||||||
|
@ -425,9 +424,10 @@ export default class SummaryUiHandler extends UiHandler {
|
||||||
if (button === Button.SUBMIT) {
|
if (button === Button.SUBMIT) {
|
||||||
this.pokemon.name = this.newName;
|
this.pokemon.name = this.newName;
|
||||||
this.hideRenamePokemon();
|
this.hideRenamePokemon();
|
||||||
|
success = true;
|
||||||
} else if (button === Button.CANCEL) {
|
} else if (button === Button.CANCEL) {
|
||||||
this.newName = this.pokemon.name;
|
|
||||||
this.hideRenamePokemon();
|
this.hideRenamePokemon();
|
||||||
|
success = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (button === Button.ACTION) {
|
if (button === Button.ACTION) {
|
||||||
|
@ -924,9 +924,13 @@ export default class SummaryUiHandler extends UiHandler {
|
||||||
|
|
||||||
showRenamePokemon() {
|
showRenamePokemon() {
|
||||||
this.renamePokemon = true;
|
this.renamePokemon = true;
|
||||||
|
this.newName = this.pokemon.name;
|
||||||
|
this.isCapitalized = true;
|
||||||
}
|
}
|
||||||
hideRenamePokemon() {
|
hideRenamePokemon() {
|
||||||
this.renamePokemon = false;
|
this.renamePokemon = false;
|
||||||
|
this.newName = this.pokemon.name;
|
||||||
|
this.isCapitalized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
showMoveSelect() {
|
showMoveSelect() {
|
||||||
|
@ -1013,6 +1017,11 @@ export default class SummaryUiHandler extends UiHandler {
|
||||||
}
|
}
|
||||||
this.hideMoveEffect(true);
|
this.hideMoveEffect(true);
|
||||||
}
|
}
|
||||||
|
if (this.renamePokemon) {
|
||||||
|
this.renamePokemon = false;
|
||||||
|
this.newName = this.pokemon.name;
|
||||||
|
this.isCapitalized = true;
|
||||||
|
}
|
||||||
this.summaryContainer.setVisible(false);
|
this.summaryContainer.setVisible(false);
|
||||||
this.summaryPageContainer.setVisible(false);
|
this.summaryPageContainer.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue