rework menus

This commit is contained in:
airstruck
2015-11-10 17:01:17 -05:00
parent 623b5ad776
commit bdc130aab9
5 changed files with 95 additions and 86 deletions

View File

@@ -291,9 +291,9 @@ The newly added child widget.
--]]--
function Widget:addChild (data)
local layout = self.layout
local child = Widget(layout, data or {})
local child = data and data.isWidget and data or Widget(layout, data or {})
table.insert(self, child)
self[#self + 1] = child
child.parent = self
child.layout = self.layout