diff options
author | Aki <nthirtyone@gmail.com> | 2017-04-09 22:07:04 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-04-09 22:07:04 +0200 |
commit | 0dd01913fe0eefc7ba4bc0797877f40fdedf9315 (patch) | |
tree | 8d270eb07f589d2487b3ce66d4865e5a4718042a /element.lua | |
parent | 55b0cf1a22e4a7e41fe00aa693445d6c4bd0652d (diff) | |
parent | a03c1125f10fbbad253a0efc4727072fcbd55345 (diff) | |
download | roflnauts-0dd01913fe0eefc7ba4bc0797877f40fdedf9315.zip roflnauts-0dd01913fe0eefc7ba4bc0797877f40fdedf9315.tar.gz roflnauts-0dd01913fe0eefc7ba4bc0797877f40fdedf9315.tar.bz2 |
Merge branch 'com'
Diffstat (limited to 'element.lua')
-rw-r--r-- | element.lua | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/element.lua b/element.lua deleted file mode 100644 index f9d1c3d..0000000 --- a/element.lua +++ /dev/null @@ -1,42 +0,0 @@ --- `Element` --- Empty element for `Menu` creation. Can be anything. -Element = { - x = 0, - y = 0, - parent -} -function Element:new(parent) - local o = {} - setmetatable(o, self) - self.__index = self - o.parent = parent - return o -end -function Element:delete() end -- deletes Element -function Element:getPosition() return self.x, self.y end -- gives x,y of Element -function Element:setPosition(x,y) - self.x, self.y = x, y - return self -end -function Element:set(name, func) - if type(name) == "string" and func ~= nil then - self[name] = func - end - return self -end - --- Menu callbacks -function Element:focus() -- Called when Element gains focus - return false -end -function Element:blur() end -- Called when Element loses focus - --- LÖVE2D callbacks -function Element:draw(scale) end -function Element:update(dt) end - --- Controller callbacks -function Element:controlpressed(set, action, key) end -function Element:controlreleased(set, action, key) end - -return Element
\ No newline at end of file |