diff options
author | Aki <nthirtyone@gmail.com> | 2017-06-27 09:02:03 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-06-27 09:02:03 +0200 |
commit | baf04a055dbc66b80c29a406907a0a595ac55f00 (patch) | |
tree | 49559118c1c6246cf7f954e9f706bae6f29e5057 /not/Element.lua | |
parent | 2c458f0c756ebe577083a7cc972a07e870cb0ba9 (diff) | |
download | roflnauts-baf04a055dbc66b80c29a406907a0a595ac55f00.zip roflnauts-baf04a055dbc66b80c29a406907a0a595ac55f00.tar.gz roflnauts-baf04a055dbc66b80c29a406907a0a595ac55f00.tar.bz2 |
Moved ui elements to use new oop lib
Diffstat (limited to 'not/Element.lua')
-rw-r--r-- | not/Element.lua | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/not/Element.lua b/not/Element.lua index e6d91da..24576e6 100644 --- a/not/Element.lua +++ b/not/Element.lua @@ -1,17 +1,15 @@ +require "not.Object" + --- `Element` -- Empty element used inside `Menu`. -Element = { - parent = --[[not.Menu]]nil, - x = 0, - y = 0 -} +Element = Object:extends() -Element.__index = Element +Element.parent = --[[not.Menu]]nil +Element.x = 0 +Element.y = 0 function Element:new (parent) - local o = setmetatable({}, self) - o.parent = parent - return o + self.parent = parent end function Element:delete () end -- deletes Element |