summaryrefslogtreecommitdiffhomepage
path: root/not/Header.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-06-27 09:02:03 +0200
committerAki <nthirtyone@gmail.com>2017-06-27 09:02:03 +0200
commitbaf04a055dbc66b80c29a406907a0a595ac55f00 (patch)
tree49559118c1c6246cf7f954e9f706bae6f29e5057 /not/Header.lua
parent2c458f0c756ebe577083a7cc972a07e870cb0ba9 (diff)
downloadroflnauts-baf04a055dbc66b80c29a406907a0a595ac55f00.zip
roflnauts-baf04a055dbc66b80c29a406907a0a595ac55f00.tar.gz
roflnauts-baf04a055dbc66b80c29a406907a0a595ac55f00.tar.bz2
Moved ui elements to use new oop lib
Diffstat (limited to 'not/Header.lua')
-rw-r--r--not/Header.lua20
1 files changed, 6 insertions, 14 deletions
diff --git a/not/Header.lua b/not/Header.lua
index a563ab2..8b2ec0d 100644
--- a/not/Header.lua
+++ b/not/Header.lua
@@ -1,22 +1,14 @@
+require "not.Element"
+
--- `Header`
-- Swinging title.
-Header = {
- parent = --[[not.Menu]]nil,
- x = 0,
- y = 0,
- text = "",
- bounce = 2,
-}
+Header = Element:extends()
--- `Header` is a child of `Element`.
-require "not.Element"
-Header.__index = Header
-setmetatable(Header, Element)
+Header.text = ""
+Header.bounce = 2
function Header:new (parent)
- local o = setmetatable({}, self)
- o.parent = parent
- return o
+ Header.__super.new(self, parent)
end
function Header:setText (text)