Thread Tools Display Modes
05-29-07, 07:52 PM   #1
Fusie
A Defias Bandit
Join Date: Jan 2007
Posts: 2
Help on a Titan mod modifaction

So i got bored the other day while looking at one of my titan mods and decided to try giving it a lil face lift. I decided to pull the Guild MOTD into the drop down tooltip from the titan panel.
Only issue is the MOTD is always on one line no matter how long it is. this can result in a very long tooltip. lol.
so i was hoping that someone could point me in the correct direction of limiting how many characters are allowed per line so it will be forced onto a second line.
here are the lines i add'd to the original mod
Code:
tooltipRichText = tooltipRichText.."\t"..TitanUtils_GetNormalText(GetGuildRosterMOTD());
any help would be great =D
  Reply With Quote
05-30-07, 03:54 AM   #2
Felankor
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: May 2007
Posts: 26
Heres one way of doing it.

You can check how long the string is with string.len(MyString)
Then in a loop you can use string.sub to split the string into smaller parts. (each being the max length for one line) and store them in an array/table.
At the end of each line put \n (That starts a new line)

Hope that helps
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Help on a Titan mod modifaction


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off