mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
limite chat upto 10 labels
This commit is contained in:
@@ -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()
|
||||||
|
Reference in New Issue
Block a user