Skip to content

Commit

Permalink
Adding for text on main dex page (#5300)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wlowscha authored Feb 11, 2025
1 parent b483aa0 commit f087162
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/ui/pokedex-ui-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
private pokemonNumberText: Phaser.GameObjects.Text;
private pokemonSprite: Phaser.GameObjects.Sprite;
private pokemonNameText: Phaser.GameObjects.Text;
private pokemonFormText: Phaser.GameObjects.Text;
private type1Icon: Phaser.GameObjects.Sprite;
private type2Icon: Phaser.GameObjects.Sprite;

Expand Down Expand Up @@ -418,6 +419,10 @@ export default class PokedexUiHandler extends MessageUiHandler {
this.pokemonNameText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonNameText);

this.pokemonFormText = addTextObject(6, 122, "", TextStyle.PARTY, { fontSize: textSettings.instructionTextSize });
this.pokemonFormText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonFormText);

const starterBoxContainer = globalScene.add.container(speciesContainerX + 6, 9); //115

this.starterSelectScrollBar = new ScrollBar(161, 12, 5, pokemonContainerWindow.height - 6, 9);
Expand Down Expand Up @@ -1943,6 +1948,12 @@ export default class PokedexUiHandler extends MessageUiHandler {
this.pokemonSprite.setTint(0);
}

if (isFormCaught || isFormSeen || globalScene.dexForDevs) {
this.pokemonFormText.setText("Form Text");
} else {
this.pokemonFormText.setText("");
}

if (isFormCaught || isFormSeen || globalScene.dexForDevs) {
const speciesForm = getPokemonSpeciesForm(species.speciesId, 0); // TODO: always selecting the first form
this.setTypeIcons(speciesForm.type1, speciesForm.type2);
Expand Down

0 comments on commit f087162

Please sign in to comment.