Gears
API ReferenceSettings.Global

ISelectorGlobalSetting<T>

A global setting chosen from a list of allowed values.

InterfaceNamespace GearsAPI.Settings.GlobalAssembly GearsAPI.dllSource
public interface ISelectorGlobalSetting<T> : IGlobalValueSetting<T>, ISelectorSettingBase

A global setting chosen from a list of allowed values. Implemented for int, float, string and any enum. An enum selector starts with every declared member as its allowed values.

Type parameters: T — int, float, string or an enum.
Implements: IGlobalValueSetting<T> · ISelectorSettingBase · IGlobalModSetting · IValueModSetting<T> · IValueModSettingBase · IModSetting

Methods

SetAllowedValues(T[])

void SetAllowedValues(T[] values);

Replaces the allowed values with values, in that order.

SetAllowedValues(T, T, T)

void SetAllowedValues(T increment, T min, T max);

Replaces the allowed values with min, min + increment, … up to and including max. increment must be greater than 0 and min no greater than max, or the call is logged and ignored. Logged and ignored on a non-numeric T.

GetAllowedValues()

T[] GetAllowedValues();

The values themselves, in the order they are selected through. The matching entry in ISelectorSettingBase.GetAllowedValuesDisplay is how each one is rendered.

On this page