Allow to overwrite draw function per widget
This commit is contained in:
parent
18880de088
commit
4f3d285218
9 changed files with 16 additions and 9 deletions
|
@ -11,7 +11,7 @@ return function(core, text, ...)
|
|||
h = h or opt.font:getHeight() + 4
|
||||
|
||||
opt.state = core:registerHitbox(opt.id, x,y,w,h)
|
||||
core:registerDraw(core.theme.Label, text, opt, x,y,w,h)
|
||||
core:registerDraw(opt.draw or core.theme.Label, text, opt, x,y,w,h)
|
||||
|
||||
return {
|
||||
id = opt.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue