Tooltip System

Tooltip SystemStaff of Light Example TooltipThe Tooltip System is designed such that a visual GUI will be drawn onto the screen when the mouse is hovering over a specific Icon element or an in world Transform object.

The Icon element is provided with the package, it’s purpose is to allow your Tooltips a reference of where to locate the proper data based on the type and name of that Icon. IconTypes EnumIcons are categorized based off three different types: Item, Skill and GameObject, each type is associated with it’s own text file. Different types and file paths can be added and changed easily, but by default these are the initial settings.
Tooltip System In terms of the type of the Icon, each GUI based Icon either the Item or Skill will need to be associated with an Icon class object. However for the GameObject Icon type, you only need one Icon for all Transform objects that you desire to have data for Tooltips.Icon Creation

The process begins as the mouse hovers over an Icon, from there that Icon’s associated Tooltip data is read-in from it’s respective type text file. Such that the text file is made up of textual syntax for the desired Tooltip data for that particular Icon.Textual Data As you can see, the above image represents an Item from the associated text file for Items. It is Color Valuesinitialized with the [it] tag, followed by the name of the item and finally another tag with a numerical value [3] which represents the desired color of the item’s text, by default [3] represents a blue color. These color values can be changed through the provided GUIController script’s Unity3D Inspector.

Continuing on, the next line is the numerical identification value [id] to represent the identification of that Item. After this comes the various statistical data [s], you can have as many of these as you need per Item, such that these values contain textual information about the stats of this Item. These values can also contain color value data tags at the end of the line to change the color of a particular line.

Lastly, the detail data [d] this works in the same way as the statistical data tags, you can have as many as you want and change the color of a particular line with a color value tag at the end of a line. The only difference is that these values are tied to there own data set for the item’s details.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>