コード例 #1
0
 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];
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 public DynamicCheckBox(ConfigDataType configDataType, string spellKey, string displayName, bool defaultValue,
                        bool isBasedOnSpell, SpellConfigProperty property)
 {
     _type     = configDataType;
     _spellKey = spellKey;
     DynamicCheckBoxInit(displayName, defaultValue, isBasedOnSpell, property);
 }
コード例 #4
0
 public DynamicCheckBox(ConfigDataType configDataType, string spellKey, string displayName, bool defaultValue,
     bool isBasedOnSpell, SpellConfigProperty property)
 {
     _type = configDataType;
     _spellKey = spellKey;
     DynamicCheckBoxInit(displayName, defaultValue, isBasedOnSpell, property);
 }
コード例 #5
0
 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);
 }
コード例 #6
0
 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;
 }
コード例 #7
0
 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;
 }
コード例 #8
0
 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;
 }
コード例 #9
0
 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;
 }
コード例 #10
0
 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];
 }