diff options
Diffstat (limited to 'style-default.lua')
-rw-r--r-- | style-default.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/style-default.lua b/style-default.lua index 5ae9dda..4a10f92 100644 --- a/style-default.lua +++ b/style-default.lua @@ -10,6 +10,10 @@ if not love.graphics.getFont() then love.graphics.setFont(love.graphics.newFont(12)) end +local function widgetHit(xx,yy, x,y,w,h) + return xx >= x and xx <= x+w and yy >= y and yy <= y+h +end + local function Button(state, title, x,y,w,h) local c = color[state] love.graphics.setColor(c.bg) @@ -104,6 +108,7 @@ end -- the style return { + widgetHit = widgetHit, color = color, Button = Button, Label = Label, |