Table of Contents
ModSetting class for a number, implying it can have a min/max value, and be an input or a slider
public abstract class ModSettingNumber<T> : BTD_Mod_Helper.Api.ModOptions.ModSetting<T>
where T : struct, System.IComparable<T>, System.ValueType, System.ValueType
T
Inheritance System.Object ModSetting BTD_Mod_Helper.Api.ModOptions.ModSetting<T> ModSettingNumber
Derived
↳ ModSettingDouble
↳ ModSettingInt
Constructs a new ModSetting for the given value
protected ModSettingNumber(T value);
value
T
The largest allowed value, or null for unbounded
public Nullable<T> max;
The lowest allowed value, or null for unbounded
public Nullable<T> min;
Action to modify the ModHelperInputField after it's created
public Action<ModHelperInputField> modifyInput;
System.Action<ModHelperInputField>
Action to modify the ModHelperSlider after it's created
public Action<ModHelperSlider> modifySlider;
System.Action<ModHelperSlider>
Whether this displays as a slider
public bool slider;
Suffix to add to the end of the slider label
public string sliderSuffix;
Step Size for the slider
protected virtual float StepSize { get; }
Validation to use for the input component
protected abstract CharacterValidation Validation { get; }
Il2CppTMPro.CharacterValidation
Conversion of the type from a float for the slider component
protected abstract T FromFloat(float f);
Get the value from the string input component
protected abstract T FromString(string s);
Conversion of the type to a float for the slider component
protected abstract float ToFloat(T input);
input
T
Turn the value into a string for labels
protected abstract string ToString(T input);
input
T