[QoL] Pokemon Info Container always on top of Battle UI (#1782)

* Added "Skip Dialogues" option (if at least 1 classic win)

* Removed error sound and hide option instead when classic wins = 0

* Add skip dialogues option to Unlockables and show unlocked message on first classic win

* Only skips seen dialogues, removed dialogue option from unlockables, seen dialogues get saved to local storage

* oops

* dont show charSprite when skipping a dialogue, small fixes

* pokemonInfoContainer always on top of battle UI when shown

---------

Co-authored-by: Frederik Hobein <frederik.hobein@nterra.com>
This commit is contained in:
Frede 2024-06-05 03:05:25 +02:00 committed by GitHub
parent 48f60a5b50
commit cfe9b3303a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -62,6 +62,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
private initialX: number;
private movesContainerInitialX: number;
private initialParentDepth: number;
public statsContainer: StatsContainer;
@ -246,6 +247,8 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
this.setVisible(true);
this.shown = true;
this.initialParentDepth = this.parentContainer.depth;
this.parentContainer.setDepth(3);
});
}
@ -266,6 +269,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
hide(speedMultiplier: number = 1): Promise<void> {
return new Promise(resolve => {
if (!this.shown) {
this.parentContainer.setDepth(this.initialParentDepth);
return resolve();
}
@ -286,6 +290,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
this.pokemonShinyIcon.off("pointerover");
this.pokemonShinyIcon.off("pointerout");
(this.scene as BattleScene).ui.hideTooltip();
this.parentContainer.setDepth(this.initialParentDepth);
resolve();
}
});