mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
Fixes confirmation issues in SAVE_AND_QUIT and LOG_OUT
This commit is contained in:
parent
a8c9065d57
commit
2c975fb60b
@ -352,6 +352,7 @@ export default class MenuUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.showText("", 0);
|
||||||
switch (adjustedCursor) {
|
switch (adjustedCursor) {
|
||||||
case MenuOptions.GAME_SETTINGS:
|
case MenuOptions.GAME_SETTINGS:
|
||||||
ui.setOverlayMode(Mode.SETTINGS);
|
ui.setOverlayMode(Mode.SETTINGS);
|
||||||
@ -442,9 +443,13 @@ export default class MenuUiHandler extends MessageUiHandler {
|
|||||||
success = true;
|
success = true;
|
||||||
if (this.scene.currentBattle.turn > 1) {
|
if (this.scene.currentBattle.turn > 1) {
|
||||||
ui.showText(i18next.t("menuUiHandler:losingProgressionWarning"), null, () => {
|
ui.showText(i18next.t("menuUiHandler:losingProgressionWarning"), null, () => {
|
||||||
|
if (!this.active) {
|
||||||
|
this.showText("", 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
ui.setOverlayMode(Mode.CONFIRM, () => this.scene.gameData.saveAll(this.scene, true, true, true, true).then(() => this.scene.reset(true)), () => {
|
ui.setOverlayMode(Mode.CONFIRM, () => this.scene.gameData.saveAll(this.scene, true, true, true, true).then(() => this.scene.reset(true)), () => {
|
||||||
ui.revertMode();
|
ui.revertMode();
|
||||||
ui.showText("", 0);
|
this.showText("", 0);
|
||||||
}, false, -98);
|
}, false, -98);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -467,9 +472,13 @@ export default class MenuUiHandler extends MessageUiHandler {
|
|||||||
};
|
};
|
||||||
if (this.scene.currentBattle) {
|
if (this.scene.currentBattle) {
|
||||||
ui.showText(i18next.t("menuUiHandler:losingProgressionWarning"), null, () => {
|
ui.showText(i18next.t("menuUiHandler:losingProgressionWarning"), null, () => {
|
||||||
|
if (!this.active) {
|
||||||
|
this.showText("", 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
ui.setOverlayMode(Mode.CONFIRM, doLogout, () => {
|
ui.setOverlayMode(Mode.CONFIRM, doLogout, () => {
|
||||||
ui.revertMode();
|
ui.revertMode();
|
||||||
ui.showText("", 0);
|
this.showText("", 0);
|
||||||
}, false, -98);
|
}, false, -98);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user