Allow setting custom widget ids
This commit is contained in:
parent
f799f48164
commit
e5c9e7e29f
7 changed files with 13 additions and 8 deletions
|
@ -38,7 +38,7 @@ return function(w)
|
|||
w.info.step = w.info.step or (w.info.max - w.info.min) / 20
|
||||
local fraction = (w.info.value - w.info.min) / (w.info.max - w.info.min)
|
||||
|
||||
local id = core.generateID()
|
||||
local id = w.id or core.generateID()
|
||||
local pos, size = group.getRect(w.pos, w.info.size)
|
||||
|
||||
mouse.updateWidget(id, pos, size, w.widgetHit)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue