limite chat upto 10 labels
This commit is contained in:
parent
5e5ddae167
commit
8bc879d295
|
@ -103,10 +103,15 @@ function Console.addTabText(text, speaktype, tab)
|
||||||
text = os.date('%H:%M') .. ' ' .. text
|
text = os.date('%H:%M') .. ' ' .. text
|
||||||
end
|
end
|
||||||
|
|
||||||
local label = createWidget('ConsoleLabel', consoleTabBar:getTabPanel(tab))
|
local panel = consoleTabBar:getTabPanel(tab)
|
||||||
|
local label = createWidget('ConsoleLabel', panel)
|
||||||
label:setText(text)
|
label:setText(text)
|
||||||
label:setColor(speaktype.color)
|
label:setColor(speaktype.color)
|
||||||
consoleTabBar:blinkTab(tab)
|
consoleTabBar:blinkTab(tab)
|
||||||
|
|
||||||
|
if panel:getChildCount() > 10 then
|
||||||
|
panel:removeChild(panel:getFirstChild())
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Console.sendCurrentMessage()
|
function Console.sendCurrentMessage()
|
||||||
|
|
Loading…
Reference in New Issue