From c30e83249c31fc75afd977dceb75f1627d06b13a Mon Sep 17 00:00:00 2001 From: Triston Date: Wed, 19 Jun 2024 21:01:55 -0500 Subject: [PATCH] add window class --- src/ui/window.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/ui/window.ts diff --git a/src/ui/window.ts b/src/ui/window.ts new file mode 100644 index 0000000..b1010ea --- /dev/null +++ b/src/ui/window.ts @@ -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; + } +}