Added states and more work on custom formations

This commit is contained in:
Pax1601
2023-04-18 11:01:31 +02:00
parent be69aeb69e
commit cfd98e74ea
19 changed files with 638 additions and 248 deletions

View File

@@ -11,6 +11,18 @@ export class UnitContextMenu extends ContextMenu {
if (dialog)
{
dialog.classList.add("hide");
var clock = 1;
while (clock < 8)
{
if ((<HTMLInputElement> dialog.querySelector(`#formation-${clock}`)).checked)
break
clock++;
}
var angleDeg = 360 - (clock - 1) * 45;
var distance = parseInt((<HTMLInputElement> dialog.querySelector(`#distance`)?.querySelector("input")).value);
var upDown = parseInt((<HTMLInputElement> dialog.querySelector(`#up-down`)?.querySelector("input")).value);
var asd= 1;
}
if (this.#callback)