the wildstar forum page: https://forums.wildstar-online.com/forums/index.php?/topic/104013-library-add-data-to-the-character-window/
HOW TO EXPORT DATA INTO THE CHARACTER WINDOW
I made this window open to anyone with this addon. To push data into it it is very easy.
In your code you will need to call this function :
function AddCharacterInformationLine(addonName, title, functionToGetValue, funtionToGetColor, data, tooltipContent)
Here are some examples:
AddCharacterInformationLine("ChoicesHelper", "Total Gear Score",function() return self:getTotalGearScore(self) end,function() return "green" end, nil,"Some help information")
As you see:
- is the name of your addon
- is the title of the line.
- is a function which will return the value to print into the value spot of the line. This function will be call everytime the character window needs to be updated.
- is a function which will return the color of the value. Like that you can make it red, green or whatever you want. If 'nil', the value will be printed in white.
- is a data object which will be accessible through the object returned.
- is the tooltip content.
When this function is called, the line will be added. Lets talk about the return value of the function.
Return:
- wnd : line form, composed of two child 'Title' and 'Value'
- update : the function you passed as second argument.
- updateColor: the function you passed as third argument, if 'nil', always white.
- data: the thing you pass as fourth argument, can be use in one of you function to do whatever you need / want
- forceUpdate: will refresh the data
- title: title of the line
- addonName: name of the addon
To remove the line, just call
function RemoveCharacterInformationLine(addonName, title)
'title' is the string title you passed as first argument when you created it.
---------
Thanks to Chill for the latest update, he made the lines ordered in alphabetical order and also made the add-on compatible with RealAP. Thanks !
---------