tModLoader v2024.09
A mod to make and play Terraria mods
HeaderAttribute Class Reference

This attribute adds a label above this property or field in the ModConfig UI that acts as a header. Use this to delineate sections within your config.
Note that fields will be in order, and properties will be in order, but fields and properties will not be interleaved together in the source code order.

Header accept either a translation key or an identifier.
To use a translation key, the value passed in must start with "$".
A value passed in that does not start with "$" is interpreted as an identifier. The identifier is used to construct the localization key "Mods.{ModName}.Configs.{ConfigName}.Headers.{Identifier}"
No spaces are allowed in translation keys, so avoid spaces
Annotations on members of non-ModConfig classes need to supply a localization key using this attribute to be localized, no localization key can be correctly assumed using just an identifier.
More...

Inherits Attribute.

Public Member Functions

 HeaderAttribute (string identifierOrKey)
 

Properties

string Header [get]
 
bool IsIdentifier [get]
 

Detailed Description

This attribute adds a label above this property or field in the ModConfig UI that acts as a header. Use this to delineate sections within your config.
Note that fields will be in order, and properties will be in order, but fields and properties will not be interleaved together in the source code order.

Header accept either a translation key or an identifier.
To use a translation key, the value passed in must start with "$".
A value passed in that does not start with "$" is interpreted as an identifier. The identifier is used to construct the localization key "Mods.{ModName}.Configs.{ConfigName}.Headers.{Identifier}"
No spaces are allowed in translation keys, so avoid spaces
Annotations on members of non-ModConfig classes need to supply a localization key using this attribute to be localized, no localization key can be correctly assumed using just an identifier.