aboutsummaryrefslogtreecommitdiffstats
path: root/input.lua
diff options
context:
space:
mode:
authorMatthias Richter <vrld@vrld.org>2012-03-14 16:19:46 +0100
committerMatthias Richter <vrld@vrld.org>2012-03-14 16:19:46 +0100
commit6de65888dc6575a00d4e16defe92bcb0ccf08423 (patch)
tree24a22f6780a1a8a38b8c7c01cba93ce372f10ab4 /input.lua
parent2e5927e963ed0652a512291d243403fa48a72cc0 (diff)
downloadQuickie-6de65888dc6575a00d4e16defe92bcb0ccf08423.tar.gz
Quickie-6de65888dc6575a00d4e16defe92bcb0ccf08423.tar.bz2
Quickie-6de65888dc6575a00d4e16defe92bcb0ccf08423.tar.xz
Quickie-6de65888dc6575a00d4e16defe92bcb0ccf08423.zip
Externalize widget hit test to style definition.
Diffstat (limited to 'input.lua')
-rw-r--r--input.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/input.lua b/input.lua
index d514348..688ce5f 100644
--- a/input.lua
+++ b/input.lua
@@ -1,11 +1,11 @@
local core = require((...):match("(.-)[^%.]+$") .. 'core')
-return function(info, x,y,w,h, draw)
+return function(info, x,y,w,h, widgetHit, draw)
info.text = info.text or ""
info.cursor = math.min(info.cursor or info.text:len(), info.text:len())
local id = core.generateID()
- core.mouse.updateState(id, x,y,w,h)
+ core.mouse.updateState(id, widgetHit or core.style.widgetHit, x,y,w,h)
core.makeCyclable(id)
if core.isActive(id) then core.setKeyFocus(id) end