clipping for transistions + tab ordering via index + more examples
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user