public StringSlider(ConfigDataType type, string key, string displayName, int defaultValueIndex = 0, SpellConfigProperty property = SpellConfigProperty.None, params string[] options) { Options = options; Slider = new DynamicSlider(type, key, displayName, defaultValueIndex, 0, options.Length - 1, property != SpellConfigProperty.None, property); Slider.Slider.OnValueChange += _slider_OnValueChange; Slider.Slider.DisplayName = options[Slider.Slider.CurrentValue]; }
public DynamicSlider(ConfigDataType configDataType, string spelKey, string displayName, int defaultValue, int minValue, int maxValue, bool isBasedOnSpell, SpellConfigProperty property) { _type = configDataType; _spellKey = spelKey; DynamicSliderInit(displayName, defaultValue, minValue, maxValue, isBasedOnSpell, property); }
public DynamicCheckBox(ConfigDataType configDataType, string spellKey, string displayName, bool defaultValue, bool isBasedOnSpell, SpellConfigProperty property) { _type = configDataType; _spellKey = spellKey; DynamicCheckBoxInit(displayName, defaultValue, isBasedOnSpell, property); }
public void DynamicSliderInit(string displayName, int defaultValue, int minValue, int maxValue, bool isBasedOnSpell, SpellConfigProperty property) { _spellProperty = property; _isBasedOnSpell = isBasedOnSpell; Slider = new Slider(displayName, defaultValue, minValue, maxValue); if (_type == ConfigDataType.Data) { Properties.SetValue(_configKey, defaultValue, false); } Slider.OnValueChange += Slider_OnValueChange; Properties.OnConfigValueChanged += Config_OnConfigValueChanged; }
public void DynamicCheckBoxInit(string displayName, bool defaultValue, bool isBasedOnSpell, SpellConfigProperty property) { CheckBox = new CheckBox(displayName, defaultValue); _spellProperty = property; _isBasedOnSpell = isBasedOnSpell; if (_type == ConfigDataType.Data) { Properties.SetValue(_configKey, defaultValue, false); } CheckBox.OnValueChange += CheckBox_OnValueChange; Properties.OnConfigValueChanged += Config_OnConfigValueChanged; }