Terraria ModLoader  0.11.5
A framework for Terraria mods
Terraria.ModLoader.Config.TooltipAttribute Class Reference

This attribute sets a hover tooltip for the annotated property or field to be shown in the ModConfig UI. This can be longer and more descriptive than Label. Starting the tooltip with $ means the tooltip should be interpreted as a Localization key. More...

+ Inheritance diagram for Terraria.ModLoader.Config.TooltipAttribute:
+ Collaboration diagram for Terraria.ModLoader.Config.TooltipAttribute:

Public Member Functions

 TooltipAttribute (string tooltip)
 

Public Attributes

string Tooltip => tooltip.StartsWith("$") ? Localization.Language.GetTextValue(tooltip.Substring(1)) : tooltip
 

Private Attributes

readonly string tooltip
 

Detailed Description

This attribute sets a hover tooltip for the annotated property or field to be shown in the ModConfig UI. This can be longer and more descriptive than Label. Starting the tooltip with $ means the tooltip should be interpreted as a Localization key.

Definition at line 58 of file ConfigAttributes.cs.

Constructor & Destructor Documentation

Terraria.ModLoader.Config.TooltipAttribute.TooltipAttribute ( string  tooltip)

Definition at line 61 of file ConfigAttributes.cs.

61  {
62  this.tooltip = tooltip;
63  }

Member Data Documentation

readonly string Terraria.ModLoader.Config.TooltipAttribute.tooltip
private

Definition at line 60 of file ConfigAttributes.cs.

string Terraria.ModLoader.Config.TooltipAttribute.Tooltip => tooltip.StartsWith("$") ? Localization.Language.GetTextValue(tooltip.Substring(1)) : tooltip

Definition at line 64 of file ConfigAttributes.cs.