Custom formations

This commit is contained in:
Pax1601
2023-04-17 18:01:23 +02:00
parent 77d39c17b8
commit be69aeb69e
16 changed files with 1194 additions and 36 deletions

View File

@@ -1,8 +1,21 @@
import { ContextMenu } from "./contextmenu";
export class UnitContextMenu extends ContextMenu {
#callback: CallableFunction | null = null;
constructor(id: string) {
super(id);
document.addEventListener("applyCustomFormation", () => {
var dialog = document.getElementById("custom-formation-dialog");
if (dialog)
{
dialog.classList.add("hide");
}
if (this.#callback)
this.#callback()
})
}
setOptions(options: {[key: string]: string}, callback: CallableFunction)