Table of Contents

Class ToggleAttribute

Namespace
Nautilus.Options.Attributes
Assembly
Nautilus.dll
Attribute used to signify the decorated bool should be represented in the mod's option menu as a ModToggleOption.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false)]
public sealed class ToggleAttribute : ModOptionAttribute, _Attribute
Inheritance
ToggleAttribute
Implements
Inherited Members
Extension Methods

Examples

using Nautilus.Json;
using Nautilus.Options;

[Menu("My Options Menu")]
public class Config : ConfigFile
{
    [Toggle("My Toggle")]
    public bool MyToggle;
}

Constructors

ToggleAttribute()

Signifies the decorated bool should be represented in the mod's option menu as a ModToggleOption.
public ToggleAttribute()

ToggleAttribute(string)

Signifies the decorated bool should be represented in the mod's option menu as a ModToggleOption.
public ToggleAttribute(string label = null)

Parameters

label string
The label for the toggle.

See Also