Table of Contents

Class ModOption<T, E>

Namespace
Nautilus.Options
Assembly
Nautilus.dll
The common generic-typed abstract class to all mod options.
public abstract class ModOption<T, E> : OptionItem where E : ConfigOptionEventArgs<T>

Type Parameters

T
E
Inheritance
ModOption<T, E>
Derived
Inherited Members
Extension Methods

Constructors

ModOption(string, string, T)

Base constructor for all typed mod options.
public ModOption(string label, string id, T value)

Parameters

label string
The display text to show on the in-game menus.
id string
The internal ID if this option.
value T
The typed value of the OptionItem

Properties

Value

The value for the ModOption<T, E>.
public T Value { get; set; }

Property Value

T

Methods

GetDelegates()

Gets the Invocation List for the OnChanged event or returns null if none present.
public IEnumerable<EventHandler<E>> GetDelegates()

Returns

IEnumerable<EventHandler<E>>

OnChange(string, T)

Notifies an option change to all subscribed event handlers.
public void OnChange(string id, T value)

Parameters

id string
value T

Events

OnChanged

The event that is called whenever an option is changed.
public event EventHandler<E> OnChanged

Event Type

EventHandler<E>