Skip to main content

Part 4: Basic UI

GDTK: Stats comes with an array of UI items for you to easily display information to your user. These items can be quickly accessed by right-clicking in the Hierarchy and selecting UI > GDTK: Stats

Stat Progressbar (with Icon)#

UI > GDTK: Stats > Stat Progressbar (with Icon)

This component creates UI element for you to visualize the value of Stat including a progressbar and image for displaying the associated icon.

"Figure 1" "Figure 2"

Field NameDescription
SourceWhere to find the Stat Source (Direct Reference or Find In Registry).
StatsDirect reference to Stat Source.
KeyKey used to find Stat Source in the Tool Registry.
Value IdId of the Stat used to provide the Value on the progressbar.
Minimum Id(Optional) If blank the same Stat is used to set the Minimum of the progressbar, otherwise the Stat supplied here is used.
Maximum Id(Optional) If blank the same Stat is used to set the Maximum of the progressbar, otherwise the Stat supplied here is used.
ImageImage component used to display the icon associated with the Stat supplied in Value Id.
Color ImageIf checked the Image will have it's color changed to match that supplied in the Stat.
Color ProgressIf checked the Progressbar will have it's fill color changed to match that supplied in the Stat.

Stat List UI#

UI > GDTK: Stats > Lists > Stat List

This component creates UI element that lists all Stats associated with a Stat Source that are not marked as Hidden. A Template object is also automatically created.

"Figure 3" "Figure 4"

Field NameDescription
SourceWhere to find the Stat Source (Direct Reference or Find In Registry).
StatsDirect referecne to Stat Source.
KeyKey used to find Stat Source in the Tool Registry.
UI PrefabScene or Prefab Stat UI component to instantiate for each Stat.
ContentTransform to set as the parent for each instantiated object.
On List UpdatedEvent raised whenever the list is updated (including on start).

Stat UI#

UI > GDTK: Stats > Stat UI

This component creates UI element that displays information for a specific Stat. One is automatically created as a template for the Stat List UI but you can also reference Stats manually one at a time using this component. If you reference a Stat manually, you can display information even if the Stat is marked as Hidden.

"Figure 5"

Field NameDescription
SourceWhere to find the Stat Source (Direct Reference or Find In Registry).
StatsDirect referecne to Stat Source.
KeyKey used to find Stat Source in the Tool Registry.
Treat As IntIf checked when any value on the Stat is displayed it is first converted to an int.
ImageImage used to display the icon associated with the Stat.
ColorizeIf checked the Image will have it's color changed to match that supplied in the Stat.

Formatted Labels#

This array is used to add one or more Label controls that have their values updated to reflect data about the Stat.

Field NameDescription
TargetLabel to use when setting text
FormatFormat to use when setting text on the Target.

Show Help#

When this option is checked a helpbox will display all of the available formatting options and their descriptions.

Note#

When being used by the Stat List UI the following fields are automatically set and can be ignored: Source, Stats, Key.