mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 08:22:16 +02:00
Compare commits
4 Commits
7bea5eb86e
...
0df40893b2
Author | SHA1 | Date | |
---|---|---|---|
|
0df40893b2 | ||
|
2d0cf54a7f | ||
|
38d4a594a0 | ||
|
0f6170b3f7 |
@ -50,8 +50,8 @@ import CandyBar from "./ui/candy-bar";
|
||||
import { Variant, variantData } from "./data/variant";
|
||||
import { Localizable } from "#app/interfaces/locales";
|
||||
import Overrides from "#app/overrides";
|
||||
import {InputsController} from "./inputs-controller";
|
||||
import {UiInputs} from "./ui-inputs";
|
||||
import { InputsController } from "./inputs-controller";
|
||||
import { UiInputs } from "./ui-inputs";
|
||||
import { NewArenaEvent } from "./events/battle-scene";
|
||||
import { ArenaFlyout } from "./ui/arena-flyout";
|
||||
import { EaseType } from "#enums/ease-type";
|
||||
@ -66,7 +66,7 @@ import { Species } from "#enums/species";
|
||||
import { UiTheme } from "#enums/ui-theme";
|
||||
import { TimedEventManager } from "#app/timed-event-manager.js";
|
||||
import i18next from "i18next";
|
||||
import {TrainerType} from "#enums/trainer-type";
|
||||
import { TrainerType } from "#enums/trainer-type";
|
||||
import { battleSpecDialogue } from "./data/dialogue";
|
||||
import { LoadingScene } from "./loading-scene";
|
||||
|
||||
@ -2652,7 +2652,8 @@ export default class BattleScene extends SceneBase {
|
||||
wave: this.currentBattle?.waveIndex || 0,
|
||||
party: this.party ? this.party.map(p => {
|
||||
return { name: p.name, level: p.level };
|
||||
}) : []
|
||||
}) : [],
|
||||
modeChain: this.ui?.getModeChain() ?? [],
|
||||
};
|
||||
(window as any).gameInfo = gameInfo;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import { OptionSelectConfig, OptionSelectItem } from "./abstact-option-select-ui
|
||||
import { Tutorial, handleTutorial } from "../tutorial";
|
||||
import { loggedInUser, updateUserInfo } from "../account";
|
||||
import i18next from "i18next";
|
||||
import {Button} from "#enums/buttons";
|
||||
import { Button } from "#enums/buttons";
|
||||
import { GameDataType } from "#enums/game-data-type";
|
||||
import BgmBar from "#app/ui/bgm-bar";
|
||||
|
||||
@ -97,7 +97,6 @@ export default class MenuUiHandler extends MessageUiHandler {
|
||||
|
||||
render() {
|
||||
const ui = this.getUi();
|
||||
console.log(ui.getModeChain());
|
||||
this.excludedMenus = () => [
|
||||
{ condition: ![Mode.COMMAND, Mode.TITLE].includes(ui.getModeChain()[0]), options: [ MenuOptions.EGG_GACHA, MenuOptions.EGG_LIST] },
|
||||
{ condition: bypassLogin, options: [ MenuOptions.LOG_OUT ] }
|
||||
|
11
src/ui/ui.ts
11
src/ui/ui.ts
@ -1,4 +1,4 @@
|
||||
import {default as BattleScene} from "../battle-scene";
|
||||
import { default as BattleScene } from "../battle-scene";
|
||||
import UiHandler from "./ui-handler";
|
||||
import BattleMessageUiHandler from "./battle-message-ui-handler";
|
||||
import CommandUiHandler from "./command-ui-handler";
|
||||
@ -24,7 +24,7 @@ import EggHatchSceneHandler from "./egg-hatch-scene-handler";
|
||||
import EggListUiHandler from "./egg-list-ui-handler";
|
||||
import EggGachaUiHandler from "./egg-gacha-ui-handler";
|
||||
import VouchersUiHandler from "./vouchers-ui-handler";
|
||||
import {addWindow} from "./ui-theme";
|
||||
import { addWindow } from "./ui-theme";
|
||||
import LoginFormUiHandler from "./login-form-ui-handler";
|
||||
import RegistrationFormUiHandler from "./registration-form-ui-handler";
|
||||
import LoadingModalUiHandler from "./loading-modal-ui-handler";
|
||||
@ -37,8 +37,8 @@ import SavingIconHandler from "./saving-icon-handler";
|
||||
import UnavailableModalUiHandler from "./unavailable-modal-ui-handler";
|
||||
import OutdatedModalUiHandler from "./outdated-modal-ui-handler";
|
||||
import SessionReloadModalUiHandler from "./session-reload-modal-ui-handler";
|
||||
import {Button} from "#enums/buttons";
|
||||
import i18next, {ParseKeys} from "i18next";
|
||||
import { Button } from "#enums/buttons";
|
||||
import i18next, { ParseKeys } from "i18next";
|
||||
import GamepadBindingUiHandler from "./settings/gamepad-binding-ui-handler";
|
||||
import SettingsKeyboardUiHandler from "#app/ui/settings/settings-keyboard-ui-handler";
|
||||
import KeyboardBindingUiHandler from "#app/ui/settings/keyboard-binding-ui-handler";
|
||||
@ -453,6 +453,7 @@ export default class UI extends Phaser.GameObjects.Container {
|
||||
}
|
||||
if (chainMode && this.mode && !clear) {
|
||||
this.modeChain.push(this.mode);
|
||||
(this.scene as BattleScene).updateGameInfo();
|
||||
}
|
||||
this.mode = mode;
|
||||
const touchControls = document?.getElementById("touchControls");
|
||||
@ -500,6 +501,7 @@ export default class UI extends Phaser.GameObjects.Container {
|
||||
|
||||
resetModeChain(): void {
|
||||
this.modeChain = [];
|
||||
(this.scene as BattleScene).updateGameInfo();
|
||||
}
|
||||
|
||||
revertMode(): Promise<boolean> {
|
||||
@ -513,6 +515,7 @@ export default class UI extends Phaser.GameObjects.Container {
|
||||
const doRevertMode = () => {
|
||||
this.getHandler().clear();
|
||||
this.mode = this.modeChain.pop()!; // TODO: is this bang correct?
|
||||
(this.scene as BattleScene).updateGameInfo();
|
||||
const touchControls = document.getElementById("touchControls");
|
||||
if (touchControls) {
|
||||
touchControls.dataset.uiMode = Mode[this.mode];
|
||||
|
Loading…
Reference in New Issue
Block a user