From 07f3e08de6d1c9a038ed22001dedb50050a18b3b Mon Sep 17 00:00:00 2001 From: Danbaba1 <98762494+Danbaba1@users.noreply.github.com> Date: Fri, 24 Jun 2022 11:17:47 +0100 Subject: [PATCH] Create window system --- window system | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 window system diff --git a/window system b/window system new file mode 100644 index 0000000..5a16718 --- /dev/null +++ b/window system @@ -0,0 +1,37 @@ +export function Size(width = 80,height = 60) { + this.width = width; + this.height = height; +} +Size.prototype.resize = function(newWidth,newHeight){ + this.width = newWidth; + this.height = newHeight; +}; + +export function Position(x=0,y=0){ + this.x = x; + this.y = y; +} +Position.prototype.move = function (newX,newY) { + this.x = newX; + this.y = newY; +} + +export class ProgramWindow{ + constructor(screenSize,width=800,height=600){ + this.screenSize = []; + this.screenSize.width = width; + this.screenSize.height = height; + this.size = new Size(); + this.position = new Position(); + } + resize(Size){ + return this.size = new Size(); + } + move(Position){ + + } +} + +export function changeWindow(ProgramWindow){ + +}