2023-12-30 23:41:25 +00:00
|
|
|
import BattleScene from "../battle-scene";
|
|
|
|
import { ModalUiHandler } from "./modal-ui-handler";
|
|
|
|
import { addTextObject, TextStyle } from "./text";
|
|
|
|
import { Mode } from "./ui";
|
|
|
|
|
|
|
|
export default class LoadingModalUiHandler extends ModalUiHandler {
|
|
|
|
constructor(scene: BattleScene, mode?: Mode) {
|
|
|
|
super(scene, mode);
|
|
|
|
}
|
|
|
|
|
|
|
|
getModalTitle(): string {
|
2024-05-23 16:03:10 +01:00
|
|
|
return "";
|
2023-12-30 23:41:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
getWidth(): number {
|
|
|
|
return 80;
|
|
|
|
}
|
|
|
|
|
|
|
|
getHeight(): number {
|
|
|
|
return 32;
|
|
|
|
}
|
|
|
|
|
|
|
|
getMargin(): [number, number, number, number] {
|
|
|
|
return [ 0, 0, 48, 0 ];
|
|
|
|
}
|
|
|
|
|
|
|
|
getButtonLabels(): string[] {
|
|
|
|
return [ ];
|
|
|
|
}
|
|
|
|
|
|
|
|
setup(): void {
|
|
|
|
super.setup();
|
|
|
|
|
2024-05-23 16:03:10 +01:00
|
|
|
const label = addTextObject(this.scene, this.getWidth() / 2, this.getHeight() / 2, "Loading…", TextStyle.WINDOW);
|
2023-12-30 23:41:25 +00:00
|
|
|
label.setOrigin(0.5, 0.5);
|
|
|
|
|
|
|
|
this.modalContainer.add(label);
|
|
|
|
}
|
2024-05-23 16:03:10 +01:00
|
|
|
}
|