Fix softlock with title screen when opening submenus
parent
7946938828
commit
1bae39d80e
|
@ -1202,6 +1202,7 @@ export default class BattleScene extends Phaser.Scene {
|
||||||
case Mode.FIGHT:
|
case Mode.FIGHT:
|
||||||
case Mode.BALL:
|
case Mode.BALL:
|
||||||
case Mode.TARGET_SELECT:
|
case Mode.TARGET_SELECT:
|
||||||
|
case Mode.SAVE_SLOT:
|
||||||
case Mode.PARTY:
|
case Mode.PARTY:
|
||||||
case Mode.SUMMARY:
|
case Mode.SUMMARY:
|
||||||
case Mode.BIOME_SELECT:
|
case Mode.BIOME_SELECT:
|
||||||
|
|
|
@ -108,7 +108,7 @@ export default class MenuUiHandler extends MessageUiHandler {
|
||||||
}]),
|
}]),
|
||||||
xOffset: 98
|
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;
|
success = true;
|
||||||
break;
|
break;
|
||||||
case MenuOptions.MANAGE_DATA:
|
case MenuOptions.MANAGE_DATA:
|
||||||
ui.setOverlayMode(Mode.OPTION_SELECT, this.manageDataConfig);
|
ui.setOverlayMode(Mode.MENU_OPTION_SELECT, this.manageDataConfig);
|
||||||
success = true;
|
success = true;
|
||||||
break;
|
break;
|
||||||
case MenuOptions.COMMUNITY:
|
case MenuOptions.COMMUNITY:
|
||||||
ui.setOverlayMode(Mode.OPTION_SELECT, this.communityConfig);
|
ui.setOverlayMode(Mode.MENU_OPTION_SELECT, this.communityConfig);
|
||||||
success = true;
|
success = true;
|
||||||
break;
|
break;
|
||||||
case MenuOptions.LOG_OUT:
|
case MenuOptions.LOG_OUT:
|
||||||
|
|
|
@ -3,8 +3,8 @@ import AbstractOptionSelectUiHandler from "./abstact-option-select-ui-handler";
|
||||||
import { Mode } from "./ui";
|
import { Mode } from "./ui";
|
||||||
|
|
||||||
export default class OptionSelectUiHandler extends AbstractOptionSelectUiHandler {
|
export default class OptionSelectUiHandler extends AbstractOptionSelectUiHandler {
|
||||||
constructor(scene: BattleScene) {
|
constructor(scene: BattleScene, mode: Mode = Mode.OPTION_SELECT) {
|
||||||
super(scene, Mode.OPTION_SELECT);
|
super(scene, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
getWindowWidth(): integer {
|
getWindowWidth(): integer {
|
||||||
|
|
|
@ -112,7 +112,7 @@ export default class SaveSlotSelectUiHandler extends MessageUiHandler {
|
||||||
ui.setOverlayMode(Mode.CONFIRM, () => saveAndCallback(), () => {
|
ui.setOverlayMode(Mode.CONFIRM, () => saveAndCallback(), () => {
|
||||||
ui.revertMode();
|
ui.revertMode();
|
||||||
ui.showText(null, 0);
|
ui.showText(null, 0);
|
||||||
});
|
}, false, 0, 19);
|
||||||
});
|
});
|
||||||
} else
|
} else
|
||||||
saveAndCallback();
|
saveAndCallback();
|
||||||
|
|
|
@ -49,6 +49,7 @@ export enum Mode {
|
||||||
CONFIRM,
|
CONFIRM,
|
||||||
OPTION_SELECT,
|
OPTION_SELECT,
|
||||||
MENU,
|
MENU,
|
||||||
|
MENU_OPTION_SELECT,
|
||||||
SETTINGS,
|
SETTINGS,
|
||||||
ACHIEVEMENTS,
|
ACHIEVEMENTS,
|
||||||
GAME_STATS,
|
GAME_STATS,
|
||||||
|
@ -75,6 +76,7 @@ const noTransitionModes = [
|
||||||
Mode.CONFIRM,
|
Mode.CONFIRM,
|
||||||
Mode.OPTION_SELECT,
|
Mode.OPTION_SELECT,
|
||||||
Mode.MENU,
|
Mode.MENU,
|
||||||
|
Mode.MENU_OPTION_SELECT,
|
||||||
Mode.SETTINGS,
|
Mode.SETTINGS,
|
||||||
Mode.ACHIEVEMENTS,
|
Mode.ACHIEVEMENTS,
|
||||||
Mode.GAME_STATS,
|
Mode.GAME_STATS,
|
||||||
|
@ -120,6 +122,7 @@ export default class UI extends Phaser.GameObjects.Container {
|
||||||
new ConfirmUiHandler(scene),
|
new ConfirmUiHandler(scene),
|
||||||
new OptionSelectUiHandler(scene),
|
new OptionSelectUiHandler(scene),
|
||||||
new MenuUiHandler(scene),
|
new MenuUiHandler(scene),
|
||||||
|
new OptionSelectUiHandler(scene, Mode.MENU_OPTION_SELECT),
|
||||||
new SettingsUiHandler(scene),
|
new SettingsUiHandler(scene),
|
||||||
new AchvsUiHandler(scene),
|
new AchvsUiHandler(scene),
|
||||||
new GameStatsUiHandler(scene),
|
new GameStatsUiHandler(scene),
|
||||||
|
|
Loading…
Reference in New Issue