aboutsummaryrefslogtreecommitdiffstats
path: root/core.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core.lua')
-rw-r--r--core.lua8
1 files changed, 2 insertions, 6 deletions
diff --git a/core.lua b/core.lua
index a52f7cd..d97e83a 100644
--- a/core.lua
+++ b/core.lua
@@ -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)