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 SpellConfigControl(Menu menu, string label, SpellData spell, bool enableSpell) { _menu = menu; _spell = spell; _menu.AddGroupLabel(label); DodgeCheckBox = new DynamicCheckBox(ConfigDataType.Spells, spell.SpellName, "Dodge", enableSpell, true, SpellConfigProperty.Dodge); DrawCheckBox = new DynamicCheckBox(ConfigDataType.Spells, spell.SpellName, "Draw", true /*enableSpell*/, true, SpellConfigProperty.Draw); SpellRadiusSlider = new DynamicSlider(ConfigDataType.Spells, spell.SpellName, "Radius", (int)spell.Radius, (int)spell.Radius - 100, (int)spell.Radius + 100, true, SpellConfigProperty.Radius); DangerLevelSlider = new StringSlider(ConfigDataType.Spells, spell.SpellName, "Danger Level", (int)spell.Dangerlevel, SpellConfigProperty.DangerLevel, DangerLevels); }