mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-10-21 20:45:52 +02:00
* Extract Mode enum out of UI and into its own file Reduces circular imports from 909 to 773 * Move around utility files Reduces cyclical dependencies from 773 to 765 * Remove starterColors and bypassLogin from battle-scene Reduces cyclical dependencies from 765 to 623 * Fix test runner error * Update import for bypassLogin in test * Update mocks for utils in tests * Fix broken tests * Update selectWithTera override * Update path for utils in ab-attr.ts * Update path for utils in ability-class.ts * Fix utils import path in healer.test.ts
54 lines
1.1 KiB
TypeScript
54 lines
1.1 KiB
TypeScript
import type { ModalConfig } from "./modal-ui-handler";
|
|
import { ModalUiHandler } from "./modal-ui-handler";
|
|
import { addTextObject, TextStyle } from "./text";
|
|
import type { UiMode } from "#enums/ui-mode";
|
|
|
|
export default class SessionReloadModalUiHandler extends ModalUiHandler {
|
|
constructor(mode: UiMode | null = null) {
|
|
super(mode);
|
|
}
|
|
|
|
getModalTitle(): string {
|
|
return "";
|
|
}
|
|
|
|
getWidth(): number {
|
|
return 160;
|
|
}
|
|
|
|
getHeight(): number {
|
|
return 32;
|
|
}
|
|
|
|
getMargin(): [number, number, number, number] {
|
|
return [0, 0, 48, 0];
|
|
}
|
|
|
|
getButtonLabels(): string[] {
|
|
return [];
|
|
}
|
|
|
|
setup(): void {
|
|
super.setup();
|
|
|
|
const label = addTextObject(
|
|
this.getWidth() / 2,
|
|
this.getHeight() / 2,
|
|
"Your session is out of date.\nYour data will be reloaded…",
|
|
TextStyle.WINDOW,
|
|
{ fontSize: "48px", align: "center" },
|
|
);
|
|
label.setOrigin(0.5, 0.5);
|
|
|
|
this.modalContainer.add(label);
|
|
}
|
|
|
|
show(_args: any[]): boolean {
|
|
const config: ModalConfig = {
|
|
buttonActions: [],
|
|
};
|
|
|
|
return super.show([config]);
|
|
}
|
|
}
|