Files
DCSOlympus/client/src/panels/panel.ts
dpassoni a7a41e60c4 Incorporated unit info panel into unit control panel
Converted callbacks to events
Mouse info drawing moved to mouseinfopanel.ts
2023-03-06 17:45:50 +01:00

26 lines
502 B
TypeScript

export class Panel {
#element: HTMLElement
#visible: boolean = true;
constructor(ID: string) {
this.#element = <HTMLElement>document.getElementById(ID);
}
show() {
this.#element.classList.toggle("hide", false);
this.#visible = true;
}
hide() {
this.#element.classList.toggle("hide", true);
this.#visible = false;
}
getElement() {
return this.#element;
}
getVisible(){
return this.#visible;
}
}