Skip to content

M_MSCLoader_Settings_AddSlider_1

piotrulos edited this page Apr 7, 2023 · 4 revisions

Settings.AddSlider Method (Mod, String, String, Single, Single, Single, Action, Int32)

Add Slider to settings menu

Namespace: MSCLoader
Assembly: MSCLoader (in MSCLoader.dll) Version: 1.2.11.286

Syntax

C#

public static <a href="T_MSCLoader_SettingsSlider">SettingsSlider</a> AddSlider(
	<a href="T_MSCLoader_Mod">Mod</a> mod,
	string settingID,
	string name,
	float minValue,
	float maxValue,
	float value = 0f,
	Action onValueChanged = null,
	int decimalPoints = 2
)

View Source

Parameters

 

mod
Type: MSCLoader.Mod
Your mod instance
settingID
Type: System.String
Unique settings ID for your mod
name
Type: System.String
Name of the setting
minValue
Type: System.Single
minimum float value
maxValue
Type: System.Single
maximum float value
value (Optional)
Type: System.Single
Default Value for this setting
onValueChanged (Optional)
Type: System.Action
Function to execute when slider value chang
decimalPoints (Optional)
Type: System.Int32
Round value to number of decimal points

Return Value

Type: SettingsSlider
[Missing documentation for "M:MSCLoader.Settings.AddSlider(MSCLoader.Mod,System.String,System.String,System.Single,System.Single,System.Single,System.Action,System.Int32)"]

See Also

Reference

Settings Class
AddSlider Overload
MSCLoader Namespace

Clone this wiki locally