From db0d49b4a41a36b47979d0935316c26ae77c260a Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 3 Sep 2017 19:54:10 +0200 Subject: Moved default variables to constructor in Element --- not/Element.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/not/Element.lua b/not/Element.lua index 24576e6..6ac83d6 100644 --- a/not/Element.lua +++ b/not/Element.lua @@ -1,15 +1,11 @@ -require "not.Object" - --- `Element` -- Empty element used inside `Menu`. -Element = Object:extends() - -Element.parent = --[[not.Menu]]nil -Element.x = 0 -Element.y = 0 +Element = require "not.Object":extends() function Element:new (parent) self.parent = parent + self.x = 0 + self.y = 0 end function Element:delete () end -- deletes Element -- cgit v1.1