limite chat upto 10 labels

This commit is contained in:
Eduardo Bart 2012-01-14 18:14:40 -02:00
parent 5e5ddae167
commit 8bc879d295
1 changed files with 6 additions and 1 deletions

View File

@ -103,10 +103,15 @@ function Console.addTabText(text, speaktype, tab)
text = os.date('%H:%M') .. ' ' .. text
end
local label = createWidget('ConsoleLabel', consoleTabBar:getTabPanel(tab))
local panel = consoleTabBar:getTabPanel(tab)
local label = createWidget('ConsoleLabel', panel)
label:setText(text)
label:setColor(speaktype.color)
consoleTabBar:blinkTab(tab)
if panel:getChildCount() > 10 then
panel:removeChild(panel:getFirstChild())
end
end
function Console.sendCurrentMessage()