if chatbox.useNewMessageScrollAnimation then
dxSetRenderTarget(chatbox.renderTarget, true)
dxSetBlendMode("modulate_add")
end
--Lines
for i, chat in ipairs(chatbox.tabs[chatbox.selectedTabIndex].chats) do
dxDrawText(clean(chat.line), chatbox.textPosX+1, chatbox.textPosY+chatbox.height-(chatbox.lineHeight*(i-chatbox.scroll))+(chatbox.lineHeight*chatbox.newMessageScrollValue)+1, chatbox.width, chatbox.height, tocolor(0, 0, 0, chat.alpha), chatbox.fontSizeX, chatbox.fontSizeY, chatbox.font, "left", "top", false, false, false, true)
dxDrawText(chat.line, chatbox.textPosX, chatbox.textPosY+chatbox.height-(chatbox.lineHeight*(i-chatbox.scroll))+(chatbox.lineHeight*chatbox.newMessageScrollValue), chatbox.width, chatbox.height, tocolor(255, 255, 255, chat.alpha), chatbox.fontSizeX, chatbox.fontSizeY, chatbox.font, "left", "top", false, false, false, true)
end
dxSetBlendMode("blend")
if chatbox.useNewMessageScrollAnimation then
dxSetRenderTarget()
dxSetBlendMode("add")
dxDrawImage(chatbox.posX, chatbox.posY, chatbox.width, chatbox.height, chatbox.renderTarget, 0, 0, 0, tocolor(255,255,255,255), chatbox.postGUI)
dxSetBlendMode("blend")
end
function clean(text)
return string.gsub(text, '#%x%x%x%x%x%x', '')
end