Fix softlock with title screen when opening submenus

pull/16/head
Flashfyre 2024-03-15 18:02:05 -04:00
parent 7946938828
commit 1bae39d80e
5 changed files with 10 additions and 6 deletions

View File

@ -1202,6 +1202,7 @@ export default class BattleScene extends Phaser.Scene {
case Mode.FIGHT:
case Mode.BALL:
case Mode.TARGET_SELECT:
case Mode.SAVE_SLOT:
case Mode.PARTY:
case Mode.SUMMARY:
case Mode.BIOME_SELECT:

View File

@ -108,7 +108,7 @@ export default class MenuUiHandler extends MessageUiHandler {
}]),
xOffset: 98
};
ui.setOverlayMode(Mode.OPTION_SELECT, config);
ui.setOverlayMode(Mode.MENU_OPTION_SELECT, config);
});
};
@ -247,11 +247,11 @@ export default class MenuUiHandler extends MessageUiHandler {
success = true;
break;
case MenuOptions.MANAGE_DATA:
ui.setOverlayMode(Mode.OPTION_SELECT, this.manageDataConfig);
ui.setOverlayMode(Mode.MENU_OPTION_SELECT, this.manageDataConfig);
success = true;
break;
case MenuOptions.COMMUNITY:
ui.setOverlayMode(Mode.OPTION_SELECT, this.communityConfig);
ui.setOverlayMode(Mode.MENU_OPTION_SELECT, this.communityConfig);
success = true;
break;
case MenuOptions.LOG_OUT:

View File

@ -3,8 +3,8 @@ import AbstractOptionSelectUiHandler from "./abstact-option-select-ui-handler";
import { Mode } from "./ui";
export default class OptionSelectUiHandler extends AbstractOptionSelectUiHandler {
constructor(scene: BattleScene) {
super(scene, Mode.OPTION_SELECT);
constructor(scene: BattleScene, mode: Mode = Mode.OPTION_SELECT) {
super(scene, mode);
}
getWindowWidth(): integer {

View File

@ -112,7 +112,7 @@ export default class SaveSlotSelectUiHandler extends MessageUiHandler {
ui.setOverlayMode(Mode.CONFIRM, () => saveAndCallback(), () => {
ui.revertMode();
ui.showText(null, 0);
});
}, false, 0, 19);
});
} else
saveAndCallback();

View File

@ -49,6 +49,7 @@ export enum Mode {
CONFIRM,
OPTION_SELECT,
MENU,
MENU_OPTION_SELECT,
SETTINGS,
ACHIEVEMENTS,
GAME_STATS,
@ -75,6 +76,7 @@ const noTransitionModes = [
Mode.CONFIRM,
Mode.OPTION_SELECT,
Mode.MENU,
Mode.MENU_OPTION_SELECT,
Mode.SETTINGS,
Mode.ACHIEVEMENTS,
Mode.GAME_STATS,
@ -120,6 +122,7 @@ export default class UI extends Phaser.GameObjects.Container {
new ConfirmUiHandler(scene),
new OptionSelectUiHandler(scene),
new MenuUiHandler(scene),
new OptionSelectUiHandler(scene, Mode.MENU_OPTION_SELECT),
new SettingsUiHandler(scene),
new AchvsUiHandler(scene),
new GameStatsUiHandler(scene),