mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-16 06:45:24 +01:00
[UI/UX] Fix confirm options overlapping during ME (#6690)
* fix menu overlap * fix confirm ui not reappearing after summary
This commit is contained in:
parent
64176a0920
commit
a2895de364
@ -473,10 +473,15 @@ export class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
|||||||
const xPosition = fromCatch
|
const xPosition = fromCatch
|
||||||
? this.initialX - this.infoWindowWidth - 67
|
? this.initialX - this.infoWindowWidth - 67
|
||||||
: this.initialX - this.infoWindowWidth - ConfirmUiHandler.windowWidth;
|
: this.initialX - this.infoWindowWidth - ConfirmUiHandler.windowWidth;
|
||||||
|
|
||||||
|
const infoTween = globalScene.tweens.getTweensOf(this)[0];
|
||||||
|
const duration = Math.max(infoTween ? infoTween.duration - infoTween.elapsed : 0, 150);
|
||||||
|
infoTween?.destroy();
|
||||||
|
|
||||||
return new Promise<void>(resolve => {
|
return new Promise<void>(resolve => {
|
||||||
globalScene.tweens.add({
|
globalScene.tweens.add({
|
||||||
targets: this,
|
targets: this,
|
||||||
duration: fixedInt(Math.floor(150 / speedMultiplier)),
|
duration: fixedInt(Math.floor(duration / speedMultiplier)),
|
||||||
ease: "Cubic.easeInOut",
|
ease: "Cubic.easeInOut",
|
||||||
x: xPosition,
|
x: xPosition,
|
||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user