You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
425 B

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