add window class

This commit is contained in:
Triston Armstrong 2024-06-19 21:01:55 -05:00
parent 81181ffe40
commit c30e83249c
No known key found for this signature in database
GPG Key ID: FADE6AC6F956FC52

14
src/ui/window.ts Normal file
View File

@ -0,0 +1,14 @@
export default class Window {
element: HTMLDialogElement = document.createElement("dialog");
initial_size = { w: 500, h: 500 } as const;
constructor() {
this.element.style.backgroundColor = "black";
this.element.style.width = `${this.initial_size.w}`;
this.element.style.height = `${this.initial_size.h}`;
}
start(): HTMLDialogElement {
return this.element;
}
}