OMG the chat is finally scrolling!

* implement UIScrollArea
* rework console to allow scrolling
* many core ui changes in the way.. so maybe we will have new bugs
* fix in UIScrollBar
This commit is contained in:
Eduardo Bart
2012-03-25 14:10:19 -03:00
parent 179e53bb77
commit ccf55132a1
18 changed files with 200 additions and 72 deletions

View File

@@ -32,6 +32,7 @@ function UITabBar:addTab(text, panel)
end
local tab = createWidget(self:getStyleName() .. 'Button', self)
panel.isTab = true
tab.tabPanel = panel
tab.tabBar = self
tab:setText(text)
@@ -68,8 +69,8 @@ end
function UITabBar:selectTab(tab)
if self.currentTab == tab then return end
if self.contentWidget then
local selectedWidget = self.contentWidget:getFirstChild()
if selectedWidget then
local selectedWidget = self.contentWidget:getLastChild()
if selectedWidget and selectedWidget.isTab then
self.contentWidget:removeChild(selectedWidget)
end
self.contentWidget:addChild(tab.tabPanel)