Externalize widget hit test to style definition.
This commit is contained in:
parent
2e5927e963
commit
6de65888dc
7 changed files with 18 additions and 17 deletions
|
@ -1,9 +1,9 @@
|
|||
local core = require((...):match("(.-)[^%.]+$") .. 'core')
|
||||
|
||||
return function(info, x,y, w,h, draw)
|
||||
return function(info, x,y, w,h, widgetHit, draw)
|
||||
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)
|
||||
core.registerDraw(id, draw or core.style.Checkbox, info.checked,x,y,w,h)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue