Table of Contents

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

int

MinValue

Gets the minimum value of the setting.

public int MinValue { get; }

Property Value

int

Value

Gets the value of the setting.

public int Value { get; set; }

Property Value

int

Methods

Clamp(int)

Clamps the value to the minimum and maximum value of the setting.

[UsedImplicitly]
public virtual int Clamp(int value)

Parameters

value int

The 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 int

The 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 ISettingHandler

The 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

(int, int)

A tuple containing the minimum and maximum value of the setting.

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 ISettingsSaveLoad

The loader to load the setting with.

Save(ISettingsSaveLoad)

Save the setting using the provided loader.

public override void Save(ISettingsSaveLoad saver)

Parameters

saver ISettingsSaveLoad

The 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 int

The new value of the setting.

settingHandler ISettingHandler

The setting handler to save the setting with.