Allow setting custom widget ids
This commit is contained in:
parent
f799f48164
commit
e5c9e7e29f
7 changed files with 13 additions and 8 deletions
9
core.lua
9
core.lua
|
@ -65,10 +65,15 @@ end
|
|||
--
|
||||
-- Widget ID
|
||||
--
|
||||
local maxid = 0
|
||||
local maxid, uids = 0, {}
|
||||
setmetatable(uids, {__index = function(t, i)
|
||||
t[i] = {}
|
||||
return t[i]
|
||||
end})
|
||||
|
||||
local function generateID()
|
||||
maxid = maxid + 1
|
||||
return maxid
|
||||
return uids[maxid]
|
||||
end
|
||||
|
||||
--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue