mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-24 09:51:04 +00:00
bac6c22973
* eslint config + packages * updated eslint config * fix the issue eslint adding ;;;; at interfaces * first round with eslint --fix . * removed config for unused export * Revert "first round with eslint --fix ." This reverts commit 77a88e0895f7c3389cb223651b90d918af778fe9. * removed config for camelCase * for real this time, first round of eslint --fix . * halfway to manual eslint fix * eslint done * added "how to setup" the hook to eslint --fix each new file before commit (if wanted) * removed eslintrc config file duplicat * fix human error + ignore build folder + merge overrides * added curly brace style + eslint * applied double quote linter rule * added lefthook * test precommit * test precommit * test precommit * test precommit * test precommit * test precommit * test precommit * github action to run eslint * added node_modules to ignore eslint * different action for typescript * no need for different glob (default src) * node 20 * node 20 * removed no longer needed install file * remove hooks part from README * eslint fixes --------- Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
48 lines
1.0 KiB
TypeScript
48 lines
1.0 KiB
TypeScript
import BattleScene from "../battle-scene";
|
|
import { ModalConfig, ModalUiHandler } from "./modal-ui-handler";
|
|
import { addTextObject, TextStyle } from "./text";
|
|
import { Mode } from "./ui";
|
|
|
|
export default class SessionReloadModalUiHandler extends ModalUiHandler {
|
|
constructor(scene: BattleScene, mode?: Mode) {
|
|
super(scene, 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.scene, 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 ]);
|
|
}
|
|
}
|