From a912ff223ae958d0a5421edbd112035ed2f2407e Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Sat, 17 May 2025 11:02:27 -0500 Subject: [PATCH] Ensure pokemon hp numbers are not visible during stat display --- src/ui/battle-info/player-battle-info.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ui/battle-info/player-battle-info.ts b/src/ui/battle-info/player-battle-info.ts index de8a5ea4edd..77a1065dc56 100644 --- a/src/ui/battle-info/player-battle-info.ts +++ b/src/ui/battle-info/player-battle-info.ts @@ -36,6 +36,16 @@ export class PlayerBattleInfo extends BattleInfo { this.expMaskRect = expMaskRect; } + /** + * Toggle the stat overlay, ensuring that the hp numbers container is hidden while the stats are visible. + * @param visible - Whether the stats should be visible or not. + */ + override toggleStats(visible: boolean): void { + // Need to make the hp numbers container invisible + this.hpNumbersContainer.setVisible(!visible); + super.toggleStats(visible); + } + override initInfo(pokemon: PlayerPokemon): void { super.initInfo(pokemon); this.setHpNumbers(pokemon.hp, pokemon.getMaxHp());