Hello everyone
Not sure if this is a General or Lua question, but moderators will move it if I got the wrong forum section.
Anyway, I'm starting my way into Addons, Lua etc. and I'm just making a Broker plug-in for Equilibrium Notepad. Got basicly everything to work, I just cant find an elegant solution for the tooltip. I want to show the first 10 lines of content of current page. Best I currently have is this:
Code:
OnTooltipShow = function(tooltip)
if EQUI_USE_SHARED then
text = EQUI_SHARED_TEXT
else
text = EQUI_CHAR_TEXT
end
if text == "" then tooltip:AddLine("Page empty.") end
tooltip:AddLine(string.sub(text,1,100))
tooltip:AddLine(string.sub(text,101,200))
.....
end,
Its incredebly ugly since EOL gives it problems and it seperates words. Any help or point into right direction apreciated.