mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-19 02:38:11 +00:00
Adjusted makeRoomForConfirmUi to improve window spacing
This commit is contained in:
parent
14ff290b74
commit
5dd2c43f51
@ -4919,7 +4919,7 @@ export class AttemptCapturePhase extends PokemonPhase {
|
|||||||
if (this.scene.getParty().length === 6) {
|
if (this.scene.getParty().length === 6) {
|
||||||
const promptRelease = () => {
|
const promptRelease = () => {
|
||||||
this.scene.ui.showText(i18next.t("battle:partyFull", { pokemonName: pokemon.name }), null, () => {
|
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, () => {
|
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);
|
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(() => {
|
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 => {
|
return new Promise<void>(resolve => {
|
||||||
this.scene.tweens.add({
|
this.scene.tweens.add({
|
||||||
targets: this,
|
targets: this,
|
||||||
duration: Utils.fixedInt(Math.floor(150 / speedMultiplier)),
|
duration: Utils.fixedInt(Math.floor(150 / speedMultiplier)),
|
||||||
ease: "Cubic.easeInOut",
|
ease: "Cubic.easeInOut",
|
||||||
x: this.initialX - this.infoWindowWidth - ConfirmUiHandler.windowWidth,
|
x: xPosition,
|
||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user