Class IntSetting
- Namespace
- ContentSettings.API.Settings
- Assembly
- RedstoneWizard08.ContentLibrary.dll
A setting that contains an integer value.
public abstract class IntSetting : Setting, IDisposable
- Inheritance
-
IntSetting
- Implements
- Derived
- Inherited Members
Properties
MaxValue
Gets the maximum value of the setting.
public int MaxValue { get; }
Property Value
MinValue
Gets the minimum value of the setting.
public int MinValue { get; }
Property Value
Value
Gets the value of the setting.
public int Value { get; set; }
Property Value
Methods
Clamp(int)
Clamps the value to the minimum and maximum value of the setting.
[UsedImplicitly]
public virtual int Clamp(int value)
Parameters
value
intThe value to clamp.
Returns
- int
The clamped value.
Expose(int)
Exposes the value of the setting as a string, for display purposes.
[UsedImplicitly]
public virtual string Expose(int value)
Parameters
value
intThe value to expose.
Returns
- string
The exposed value.
GetDebugUI(ISettingHandler)
Gets the setting UI for the setting.
public override SettingUI GetDebugUI(ISettingHandler settingHandler)
Parameters
settingHandler
ISettingHandlerThe setting handler to get the setting UI for.
Returns
- SettingUI
The setting UI for the setting.
GetDefaultValue()
Gets the value of the setting as an integer.
public abstract int GetDefaultValue()
Returns
- int
The default value for the setting.
GetMinMaxValue()
Gets the minimum and maximum value of the setting.
protected abstract (int, int) GetMinMaxValue()
Returns
GetSettingUICell()
Gets the setting UI for the setting.
public override GameObject GetSettingUICell()
Returns
- GameObject
The setting UI for the setting.
Load(ISettingsSaveLoad)
Loads the setting using the provided loader.
public override void Load(ISettingsSaveLoad loader)
Parameters
loader
ISettingsSaveLoadThe loader to load the setting with.
Save(ISettingsSaveLoad)
Save the setting using the provided loader.
public override void Save(ISettingsSaveLoad saver)
Parameters
saver
ISettingsSaveLoadThe loader to save the setting with.
SetValue(int, ISettingHandler)
Sets the value of the setting and saves it.
public void SetValue(int newValue, ISettingHandler settingHandler)
Parameters
newValue
intThe new value of the setting.
settingHandler
ISettingHandlerThe setting handler to save the setting with.