diff options
author | Aki <nthirtyone@gmail.com> | 2017-09-04 18:42:29 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-09-04 18:42:29 +0200 |
commit | b5beef7510274c53f5b3e5c41e80fb5b338fe93d (patch) | |
tree | 6a805f91bdc82582ac04cea24d11ab1a4c5ca6b8 /not/Element.lua | |
parent | 727a4f0996383031c02977e448b15b8e83b6a9ad (diff) | |
download | roflnauts-b5beef7510274c53f5b3e5c41e80fb5b338fe93d.zip roflnauts-b5beef7510274c53f5b3e5c41e80fb5b338fe93d.tar.gz roflnauts-b5beef7510274c53f5b3e5c41e80fb5b338fe93d.tar.bz2 |
Elements now have getSize by default
Diffstat (limited to 'not/Element.lua')
-rw-r--r-- | not/Element.lua | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/not/Element.lua b/not/Element.lua index 44f8ac3..faa8b12 100644 --- a/not/Element.lua +++ b/not/Element.lua @@ -10,9 +10,14 @@ end function Element:delete () end +function Element:getSize () + return 0, 0 +end + function Element:getPosition () return self.x, self.y end + function Element:setPosition (x, y) self.x = x or 0 self.y = y or 0 @@ -26,12 +31,14 @@ function Element:set (name, func) return self end --- Called when menu tries to focus on this element. +--- Called when menu tries to focus on this element. -- If it will return false then menu will skip element and go to next in list. function Element:focus () return false -end -function Element:blur () end -- Called when Element loses focus. +end + +--- Called when Element loses focus. +function Element:blur () end -- LÖVE2D callbacks function Element:draw (scale) end |