[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:
parent
48f60a5b50
commit
cfe9b3303a
|
@ -62,6 +62,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||||
|
|
||||||
private initialX: number;
|
private initialX: number;
|
||||||
private movesContainerInitialX: number;
|
private movesContainerInitialX: number;
|
||||||
|
private initialParentDepth: number;
|
||||||
|
|
||||||
public statsContainer: StatsContainer;
|
public statsContainer: StatsContainer;
|
||||||
|
|
||||||
|
@ -246,6 +247,8 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||||
|
|
||||||
this.setVisible(true);
|
this.setVisible(true);
|
||||||
this.shown = 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> {
|
hide(speedMultiplier: number = 1): Promise<void> {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
if (!this.shown) {
|
if (!this.shown) {
|
||||||
|
this.parentContainer.setDepth(this.initialParentDepth);
|
||||||
return resolve();
|
return resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,6 +290,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||||
this.pokemonShinyIcon.off("pointerover");
|
this.pokemonShinyIcon.off("pointerover");
|
||||||
this.pokemonShinyIcon.off("pointerout");
|
this.pokemonShinyIcon.off("pointerout");
|
||||||
(this.scene as BattleScene).ui.hideTooltip();
|
(this.scene as BattleScene).ui.hideTooltip();
|
||||||
|
this.parentContainer.setDepth(this.initialParentDepth);
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue