Offsetting form cycle button when uncaught text is shown

This commit is contained in:
Wlowscha 2025-02-12 19:57:23 +01:00
parent 9c1dae8f6b
commit 7da658131d
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -601,7 +601,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
const form = species.forms[formIndex];
// If this form has a specific set of moves, we get them.
this.levelMoves = (formIndex > 0 && pokemonFormLevelMoves.hasOwnProperty(species.speciesId)) ? pokemonFormLevelMoves[species.speciesId][formIndex] : pokemonSpeciesLevelMoves[species.speciesId];
this.levelMoves = (formIndex > 0 && pokemonFormLevelMoves.hasOwnProperty(species.speciesId) && pokemonFormLevelMoves[species.speciesId].hasOwnProperty(formIndex)) ? pokemonFormLevelMoves[species.speciesId][formIndex] : pokemonSpeciesLevelMoves[species.speciesId];
this.ability1 = form.ability1;
this.ability2 = (form.ability2 === form.ability1) ? undefined : form.ability2;
this.abilityHidden = (form.abilityHidden === form.ability1) ? undefined : form.abilityHidden;
@ -1856,6 +1856,9 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
if (this.canCycleGender) {
this.updateButtonIcon(SettingKeyboard.Button_Cycle_Gender, gamepadType, this.genderIconElement, this.genderLabel);
}
} else {
// Making space for "Uncaught" text
this.instructionRowY += 8;
}
if (this.canCycleForm) {
this.updateButtonIcon(SettingKeyboard.Button_Cycle_Form, gamepadType, this.formIconElement, this.formLabel);