diff options
author | Matthias Richter <vrld@vrld.org> | 2012-03-14 16:19:46 +0100 |
---|---|---|
committer | Matthias Richter <vrld@vrld.org> | 2012-03-14 16:19:46 +0100 |
commit | 6de65888dc6575a00d4e16defe92bcb0ccf08423 (patch) | |
tree | 24a22f6780a1a8a38b8c7c01cba93ce372f10ab4 /core.lua | |
parent | 2e5927e963ed0652a512291d243403fa48a72cc0 (diff) | |
download | Quickie-6de65888dc6575a00d4e16defe92bcb0ccf08423.tar.gz Quickie-6de65888dc6575a00d4e16defe92bcb0ccf08423.tar.bz2 Quickie-6de65888dc6575a00d4e16defe92bcb0ccf08423.tar.xz Quickie-6de65888dc6575a00d4e16defe92bcb0ccf08423.zip |
Externalize widget hit test to style definition.
Diffstat (limited to 'core.lua')
-rw-r--r-- | core.lua | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -29,12 +29,8 @@ keyboard.cycle = { next = {key = 'tab'}, } -function mouse.inRect(x,y,w,h) - return mouse.x >= x and mouse.x <= x+w and mouse.y >= y and mouse.y <= y+h -end - -function mouse.updateState(id, x,y,w,h) - if mouse.inRect(x,y,w,h) then +function mouse.updateState(id, widgetHit, ...) + if widgetHit(mouse.x, mouse.y, ...) then setHot(id) if not context.active and mouse.down then setActive(id) |