clipping for transistions + tab ordering via index + more examples

This commit is contained in:
kepler155c@gmail.com
2019-11-15 12:51:44 -07:00
parent 14057c2bf9
commit efa1a5bbf5
11 changed files with 138 additions and 57 deletions

View File

@@ -34,6 +34,15 @@ function UI.MenuBar:addButtons(buttons)
self.children = { }
end
for _,button in pairs(buttons) do
if button.index then -- don't sort unless needed
table.sort(buttons, function(a, b)
return (a.index or 999) < (b.index or 999)
end)
break
end
end
for _,button in pairs(buttons) do
if button.UIElement then
table.insert(self.children, button)