mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 16:26:25 +00:00
Adjusted makeRoomForConfirmUi to improve window spacing
This commit is contained in:
parent
c078028538
commit
f334b61604
@ -4990,7 +4990,7 @@ export class AttemptCapturePhase extends PokemonPhase {
|
||||
if (this.scene.getParty().length === 6) {
|
||||
const promptRelease = () => {
|
||||
this.scene.ui.showText(i18next.t("battle:partyFull", { pokemonName: pokemon.name }), null, () => {
|
||||
this.scene.pokemonInfoContainer.makeRoomForConfirmUi();
|
||||
this.scene.pokemonInfoContainer.makeRoomForConfirmUi(1, true);
|
||||
this.scene.ui.setMode(Mode.CONFIRM, () => {
|
||||
const newPokemon = this.scene.addPlayerPokemon(pokemon.species, pokemon.level, pokemon.abilityIndex, pokemon.formIndex, pokemon.gender, pokemon.shiny, pokemon.variant, pokemon.ivs, pokemon.nature, pokemon);
|
||||
this.scene.ui.setMode(Mode.SUMMARY, newPokemon).then(() => {
|
||||
|
@ -364,13 +364,14 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||
});
|
||||
}
|
||||
|
||||
makeRoomForConfirmUi(speedMultiplier: number = 1): Promise<void> {
|
||||
makeRoomForConfirmUi(speedMultiplier: number = 1, fromCatch: boolean = false): Promise<void> {
|
||||
const xPosition = fromCatch ? this.initialX - this.infoWindowWidth - 65 : this.initialX - this.infoWindowWidth - ConfirmUiHandler.windowWidth;
|
||||
return new Promise<void>(resolve => {
|
||||
this.scene.tweens.add({
|
||||
targets: this,
|
||||
duration: Utils.fixedInt(Math.floor(150 / speedMultiplier)),
|
||||
ease: "Cubic.easeInOut",
|
||||
x: this.initialX - this.infoWindowWidth - ConfirmUiHandler.windowWidth,
|
||||
x: xPosition,
|
||||
onComplete: () => {
|
||||
resolve();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user