Skip to Main Content

BTD_Mod_Helper​.Api​.ModOptions​.ModSettingNumber_T_


BloonsTD6 Mod Helper

BTD_Mod_Helper.Api.ModOptions

ModSettingNumber Class

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

Type parameters

T

Inheritance System.ObjectModSettingBTD_Mod_Helper.Api.ModOptions.ModSetting<T>  ModSettingNumber

Derived
ModSettingDouble
ModSettingInt

Constructors

ModSettingNumber(T) Constructor

Constructs a new ModSetting for the given value

protected ModSettingNumber(T value);

Parameters

value T

Fields

ModSettingNumber.max Field

The largest allowed value, or null for unbounded

public Nullable<T> max;

Field Value

System.Nullable<T>

ModSettingNumber.min Field

The lowest allowed value, or null for unbounded

public Nullable<T> min;

Field Value

System.Nullable<T>

ModSettingNumber.modifyInput Field

Action to modify the ModHelperInputField after it's created

public Action<ModHelperInputField> modifyInput;

Field Value

System.Action<ModHelperInputField>

ModSettingNumber.modifySlider Field

Action to modify the ModHelperSlider after it's created

public Action<ModHelperSlider> modifySlider;

Field Value

System.Action<ModHelperSlider>

ModSettingNumber.slider Field

Whether this displays as a slider

public bool slider;

Field Value

System.Boolean

ModSettingNumber.sliderSuffix Field

Suffix to add to the end of the slider label

public string sliderSuffix;

Field Value

System.String

Properties

ModSettingNumber.StepSize Property

Step Size for the slider

protected virtual float StepSize { get; }

Property Value

System.Single

ModSettingNumber.Validation Property

Validation to use for the input component

protected abstract CharacterValidation Validation { get; }

Property Value

Il2CppTMPro.CharacterValidation

Methods

ModSettingNumber.FromFloat(float) Method

Conversion of the type from a float for the slider component

protected abstract T FromFloat(float f);

Parameters

f System.Single

Returns

T

ModSettingNumber.FromString(string) Method

Get the value from the string input component

protected abstract T FromString(string s);

Parameters

s System.String

Returns

T

ModSettingNumber.ToFloat(T) Method

Conversion of the type to a float for the slider component

protected abstract float ToFloat(T input);

Parameters

input T

Returns

System.Single

ModSettingNumber.ToString(T) Method

Turn the value into a string for labels

protected abstract string ToString(T input);

Parameters

input T

Returns

System.String

To learn how to download BTD Mod Helper and install mods, click here