Allow setting custom widget ids

This commit is contained in:
Matthias Richter 2013-01-23 13:18:58 +01:00
parent f799f48164
commit e5c9e7e29f
7 changed files with 13 additions and 8 deletions

View file

@ -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)