Fixes in options, hotkeys and viplist

This commit is contained in:
Eduardo Bart
2013-03-02 17:01:29 -03:00
parent 3ca85cbe87
commit 62921dee9b
10 changed files with 56 additions and 38 deletions

View File

@@ -167,3 +167,17 @@ function table.tostring(t)
end
return str
end
function table.collect(t, func)
local res = {}
for k,v in pairs(t) do
local a,b = func(k,v)
if a and b then
res[a] = b
elseif a ~= nil then
table.insert(res,a)
end
end
return res
end

View File

@@ -144,3 +144,11 @@ end
function UITabBar:getCurrentTab()
return self.currentTab
end
function UITabBar:getTabs()
return self.tabs
end
function UITabBar:getTabsPanel()
return table.collect(self.tabs, function(_,tab) return tab.tabPanel end)
end