[UI/UX] Fix confirm options overlapping during ME (#6690)

* fix menu overlap

* fix confirm ui not reappearing after summary
This commit is contained in:
Fabi 2025-10-27 18:05:40 +01:00 committed by GitHub
parent 64176a0920
commit a2895de364
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -473,10 +473,15 @@ export class PokemonInfoContainer extends Phaser.GameObjects.Container {
const xPosition = fromCatch
? this.initialX - this.infoWindowWidth - 67
: 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 => {
globalScene.tweens.add({
targets: this,
duration: fixedInt(Math.floor(150 / speedMultiplier)),
duration: fixedInt(Math.floor(duration / speedMultiplier)),
ease: "Cubic.easeInOut",
x: xPosition,
onComplete: () => {