Class DropdownSetting
- Namespace
- Exiled.API.Features.Core.UserSettings
- Assembly
- Exiled.API.dll
Represents a dropdown setting.
public class DropdownSetting : SettingBase, IWrapper<ServerSpecificSettingBase>, IWrapper<SSDropdownSetting>
- Inheritance
-
DropdownSetting
- Inherited Members
- Extension Methods
Constructors
DropdownSetting(int, string, IEnumerable<string>, int, DropdownEntryType, string, HeaderSetting, Action<Player, SettingBase>)
Initializes a new instance of the DropdownSetting class.
public DropdownSetting(int id, string label, IEnumerable<string> options, int defaultOptionIndex = 0, SSDropdownSetting.DropdownEntryType dropdownEntryType = DropdownEntryType.Regular, string hintDescription = null, HeaderSetting header = null, Action<Player, SettingBase> onChanged = null)
Parameters
id
intlabel
stringoptions
IEnumerable<string>defaultOptionIndex
intdropdownEntryType
SSDropdownSetting.DropdownEntryTypehintDescription
stringheader
HeaderSettingonChanged
Action<Player, SettingBase>
Properties
Base
Gets the base UserSettings.ServerSpecific.SSDropdownSetting that this class is wrapping.
public SSDropdownSetting Base { get; }
Property Value
- SSDropdownSetting
DefaultOption
Gets or sets a default option.
public string DefaultOption { get; set; }
Property Value
DefaultOptionIndex
Gets or sets an index of default option.
public int DefaultOptionIndex { get; set; }
Property Value
DropdownType
Gets or sets a type of dropdown.
public SSDropdownSetting.DropdownEntryType DropdownType { get; set; }
Property Value
- SSDropdownSetting.DropdownEntryType
Options
Gets or sets a collection of all options in dropdown.
public IEnumerable<string> Options { get; set; }
Property Value
SelectedIndex
Gets or sets an index of selected option.
public int SelectedIndex { get; set; }
Property Value
SelectedOption
Gets or sets a selected option.
public string SelectedOption { get; set; }
Property Value
Methods
ToString()
Gets a string representation of this DropdownSetting.
public override string ToString()
Returns
- string
A string in human-readable format.