mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
24 lines
725 B
TypeScript
24 lines
725 B
TypeScript
import { getApp } from "..";
|
|
import { Dropdown } from "../controls/dropdown";
|
|
import { Switch } from "../controls/switch";
|
|
import { Toolbar } from "./toolbar";
|
|
|
|
export class PrimaryToolbar extends Toolbar {
|
|
#mainDropdown: Dropdown;
|
|
#cameraLinkTypeSwitch: Switch;
|
|
|
|
constructor(ID: string) {
|
|
super(ID);
|
|
|
|
/* The content of the dropdown is entirely defined in the .ejs file */
|
|
this.#mainDropdown = new Dropdown("app-icon", () => { });
|
|
|
|
this.#cameraLinkTypeSwitch = new Switch("camera-link-type-switch", (value: boolean) => {
|
|
getApp().getMap().setCameraControlMode(value? 'map': 'live');
|
|
})
|
|
}
|
|
|
|
getMainDropdown() {
|
|
return this.#mainDropdown;
|
|
}
|
|
} |