tibia-client/modules/game/textmessage.lua

16 lines
425 B
Lua
Raw Normal View History

2011-08-30 17:12:57 +02:00
local textMessageWidget
function Game.onTextMessage(message)
if textMessageWidget then
textMessageWidget:destroy()
end
local newTextMessageWidget = loadUI('/game/ui/textmessage.otui', Game.gameMapUi)
time = #message * 75
newTextMessageWidget:setText(message)
scheduleEvent(function()
newTextMessageWidget:destroy()
end, time)
textMessageWidget = newTextMessageWidget
end