Class SliderSetting
- Namespace
- Exiled.API.Features.Core.UserSettings
- Assembly
- Exiled.API.dll
Represents a slider setting.
public class SliderSetting : SettingBase, IWrapper<ServerSpecificSettingBase>, IWrapper<SSSliderSetting>- Inheritance
- 
      
      
      
      SliderSetting
- Inherited Members
- Extension Methods
Constructors
SliderSetting(int, string, float, float, float, bool, string, string, string)
Initializes a new instance of the SliderSetting class.
[Obsolete("Will be removed in Exiled 10 in favour of ctor with more params.")]
public SliderSetting(int id, string label, float minValue, float maxValue, float defaultValue, bool isInteger, string stringFormat, string displayFormat, string hintDescription)Parameters
- idint
- labelstring
- minValuefloat
- maxValuefloat
- defaultValuefloat
- isIntegerbool
- stringFormatstring
- displayFormatstring
- hintDescriptionstring
SliderSetting(int, string, float, float, float, bool, string, string, string, byte, bool, HeaderSetting, Action<Player, SettingBase>)
Initializes a new instance of the SliderSetting class.
public SliderSetting(int id, string label, float minValue, float maxValue, float defaultValue, bool isInteger = false, string stringFormat = "0.##", string displayFormat = "{0}", string hintDescription = null, byte collectionId = 255, bool isServerOnly = false, HeaderSetting header = null, Action<Player, SettingBase> onChanged = null)Parameters
- idint
- labelstring
- minValuefloat
- maxValuefloat
- defaultValuefloat
- isIntegerbool
- stringFormatstring
- displayFormatstring
- hintDescriptionstring
- collectionIdbyte
- isServerOnlybool
- headerHeaderSetting
- onChangedAction<Player, SettingBase>
Properties
Base
Gets the base UserSettings.ServerSpecific.SSSliderSetting that this class is wrapping.
public SSSliderSetting Base { get; }Property Value
- SSSliderSetting
DefaultValue
Gets or sets the default value of the slider.
public float DefaultValue { get; set; }Property Value
DisplayFormat
Gets or sets the formatting used for the final display of the value of the slider.
public string DisplayFormat { get; set; }Property Value
IsBeingDragged
Gets a value indicating whether the slider is currently being dragged.
public bool IsBeingDragged { get; }Property Value
IsInteger
Gets or sets a value indicating whether the slider displays integers.
public bool IsInteger { get; set; }Property Value
MaximumValue
Gets or sets the maximum value of the slider.
public float MaximumValue { get; set; }Property Value
MinimumValue
Gets or sets the minimum value of the slider.
public float MinimumValue { get; set; }Property Value
SliderValue
Gets a float that represents the current value of the slider.
public float SliderValue { get; }Property Value
StringFormat
Gets or sets the formatting used for the number in the slider.
public string StringFormat { get; set; }Property Value
Methods
ToString()
Returns a representation of this SliderSetting.
public override string ToString()Returns
- string
- A string in human-readable format. 
UpdateSetting(float, float, bool, string, string, bool, Predicate<Player>)
Sends updated values to clients.
public void UpdateSetting(float min, float max, bool isInteger, string stringFormat, string displayFormat, bool overrideValue = true, Predicate<Player> filter = null)Parameters
- minfloat
- maxfloat
- isIntegerbool
- stringFormatstring
- displayFormatstring
- overrideValuebool
- If false, sends fake values. 
- filterPredicate<Player>
- Who to send the update to. 
UpdateValue(float, bool, Predicate<Player>)
If setting is server only, sends updated values to clients.
public void UpdateValue(float value, bool overrideValue = true, Predicate<Player> filter = null)