Class ModOptionAttribute
- Namespace
- Nautilus.Options.Attributes
- Assembly
- Nautilus.dll
Abstract base attribute used to signify the decorated public member should generate a OptionItem
in a mod's options menu.
[AttributeUsage(AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false)]
public abstract class ModOptionAttribute : Attribute, _Attribute
- Inheritance
-
ModOptionAttribute
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
ModOptionAttribute(string)
Signifies the decorated member should be represented in the mod's options menu as a OptionItem
with an optional label.
protected ModOptionAttribute(string label = null)
Parameters
label
string- The label to display. If none is set, the name of the member will be used. If LabelLanguageId is set, this will be ignored.
Properties
Id
The Id to be used for the field in the mod's option menu. If none is specified, one will be automatically generated when
your ConfigFile is registered to the OptionsPanelHandler. This means it will
change every time the game is launched, but is guaranteed to be unique. If you would like to specify an Id to use for
internal comparisons, you can do so here.
public string Id { get; set; }
Property Value
Label
The label to use when displaying the field in the mod's options menu. If LabelLanguageId is set, this
will be ignored.
public string Label { get; set; }
Property Value
LabelLanguageId
An optional id to be parsed with Get(string) for the label, allowing for custom language-based strings
via the LanguageHandler API. If this is set, it will take precedence.
public string LabelLanguageId { get; set; }
Property Value
- See Also
Order
The order in which to display fields in the mod's option menu, in ascending order. If none is specified, the order will be
automatically set.
public int Order { get; set; }
Property Value
Tooltip
An optional tooltip to display for the field. If TooltipLanguageId is set, this will be ignored.
public string Tooltip { get; set; }
Property Value
TooltipLanguageId
An optional id to be parsed with Get(string) for the tooltip, allowing for custom lanaguage-based strings
via the LanguageHandler API. If this is set, it will take precedence.
public string TooltipLanguageId { get; set; }