From b5beef7510274c53f5b3e5c41e80fb5b338fe93d Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 4 Sep 2017 18:42:29 +0200 Subject: Elements now have getSize by default --- not/Element.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'not') 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 -- cgit v1.1