public static void SetManaCondition(this Spell spell, ManaMode mode, int value) { if (!ManaDictionary.ContainsKey(mode)) { ManaDictionary.Add(mode, new Dictionary <SpellSlot, int>()); } ManaDictionary[mode].Add(spell.Slot, value); var m = mode.ToString(); if (!_menu.SubMenu(m).Items.Any()) { _menu.SubMenu(m).AddBool(m + "Enabled", "Enabled in " + m); _menu.SubMenu(m).AddInfo(m + "Info", "-- Spells -- ", Color.AliceBlue); } var item = _menu.SubMenu(m) .AddSlider(ObjectManager.Player.ChampionName + spell.Slot + "Mana", spell.Slot + " Mana Percent", value); item.ValueChanged += delegate(object sender, OnValueChangeEventArgs args) { ManaDictionary[mode][spell.Slot] = args.GetNewValue <Slider>().Value; }; }
public static void SetManaCondition(this LeagueSharp.Common.Spell spell, ManaMode mode, int value) { if (!ManaDictionary.ContainsKey(mode)) { ManaDictionary.Add(mode, new Dictionary <SpellSlot, int>()); } ManaDictionary[mode].Add(spell.Slot, value); var m = mode.ToString(); if (_menu[m + "Enabled" + spell.Slot] == null) { _menu.Add(m + "Enabled" + spell.Slot, new CheckBox("Enabled in " + m)); } var item = _menu.Add(ObjectManager.Player.ChampionName + spell.Slot + "Mana" + m, new Slider(spell.Slot + " Mana Percent", value)); _menu.AddSeparator(); _menu[ObjectManager.Player.ChampionName + spell.Slot + "Mana" + m].Cast <Slider>().OnValueChange += delegate(ValueBase <int> sender, ValueBase <int> .ValueChangeArgs args) { ManaDictionary[mode][spell.Slot] = args.NewValue; }; }
public static void SetManaCondition(this Spell spell, ManaMode mode, int value) { if (!ManaDictionary.ContainsKey(mode)) { ManaDictionary.Add(mode, new Dictionary<SpellSlot, int>()); } ManaDictionary[mode].Add(spell.Slot, value); var m = mode.ToString(); if (!_menu.SubMenu(m).Items.Any()) { _menu.SubMenu(m).AddBool(m + "Enabled", "Enabled in " + m); _menu.SubMenu(m).AddInfo(m + "Info", "-- Spells -- ", Color.AliceBlue); } var item = _menu.SubMenu(m) .AddSlider(ObjectManager.Player.ChampionName + spell.Slot + "Mana", spell.Slot + " Mana Percent", value); item.ValueChanged += delegate(object sender, OnValueChangeEventArgs args) { ManaDictionary[mode][spell.Slot] = args.GetNewValue<Slider>().Value; }; }
public static void SetManaCondition(this LeagueSharp.Common.Spell spell, ManaMode mode, int value) { if (!ManaDictionary.ContainsKey(mode)) { ManaDictionary.Add(mode, new Dictionary<SpellSlot, int>()); } ManaDictionary[mode].Add(spell.Slot, value); var m = mode.ToString(); if (_menu[m + "Enabled" + spell.Slot] == null) { _menu.Add(m + "Enabled" + spell.Slot, new CheckBox("Enabled in " + m)); } var item = _menu.Add(ObjectManager.Player.ChampionName + spell.Slot + "Mana" + m, new Slider(spell.Slot + " Mana Percent", value)); _menu.AddSeparator(); _menu[ObjectManager.Player.ChampionName + spell.Slot + "Mana" + m].Cast<Slider>().OnValueChange += delegate (ValueBase<int> sender, ValueBase<int>.ValueChangeArgs args) { ManaDictionary[mode][spell.Slot] = args.NewValue; }; }