I want to have items with varying stats- ie some wont have health, some wont have mana. Is there a way to hide any null values so they keep the tooltip clean?
Thank you Kiwasi. That is definitely an option, but this was a simple example. I have 6 stats so doing if statements for every combination would be very time consuming.May have to just bite the bullet and get typing!
If you want to get more sophisticated you can build an attributes class which wraps the attribute and its description, then you can build the string by adding all of the descriptions together.