Beispiel #1
0
        internal void AddMenu(Orbwalker.ActiveModes mode)
        {
            var menu    = MainMenu.GetMenu("cm_" + ObjectManager.Player.ChampionName.ToLower());
            var newmenu = menu.AddSubMenu("Mode " + mode, "cm_" + mode.ToString().ToLower(), "CarryMe " + ObjectManager.Player.ChampionName + " - " + mode);

            MenuDictionary.Add(mode.ToString(), newmenu);
        }
Beispiel #2
0
 internal void AddLabel(Orbwalker.ActiveModes mode, string label, bool header = false)
 {
     MenuDictionary[mode.ToString()].Add("sep_" + SeperatorCount, new Separator(header ? 15 : 10));
     ++SeperatorCount;
     if (header)
     {
         MenuDictionary[mode.ToString()].AddGroupLabel(label);
     }
     else
     {
         MenuDictionary[mode.ToString()].AddLabel(label);
     }
     MenuDictionary[mode.ToString()].Add("sep_" + SeperatorCount, new Separator(header ? 10 : 5));
     ++SeperatorCount;
 }
Beispiel #3
0
        internal void AddRadioBox(Orbwalker.ActiveModes mode, bool oneMustStayAktive, RadioBox Box1, RadioBox Box2)
        {
            var checkbox1 = MenuDictionary[mode.ToString()].Add(Box1.Identifier, new CheckBox(Box1.Name, Box1.DefaultValue));
            var checkbox2 = MenuDictionary[mode.ToString()].Add(Box2.Identifier, new CheckBox(Box2.Name, Box2.DefaultValue));

            RandioboxDictionary.Add(Box1.Name, checkbox2);
            RandioboxDictionary.Add(Box2.Name, checkbox1);

            if (oneMustStayAktive)
            {
                checkbox1.OnValueChange += CheckBoxChanged_OneStayActive;
                checkbox2.OnValueChange += CheckBoxChanged_OneStayActive;
            }
            else
            {
                checkbox1.OnValueChange += CheckBoxChanged_JustDisable;
                checkbox2.OnValueChange += CheckBoxChanged_JustDisable;
            }
        }
Beispiel #4
0
 internal bool IsChecked(Orbwalker.ActiveModes mode, string identifier)
 {
     try
     {
         return(Orbwalker.ActiveModesFlags.HasFlag(mode) &&
                MenuDictionary[mode.ToString()][identifier].Cast <CheckBox>().CurrentValue);
     }
     catch (Exception)
     {
         // checkbox not exist
         return(false);
     }
 }
Beispiel #5
0
 internal void AddSlider(Orbwalker.ActiveModes mode, string displayName, string identifier, int defaultValue, int min, int max)
 {
     MenuDictionary[mode.ToString()].Add(identifier, new Slider(displayName, defaultValue, min, max));
 }
Beispiel #6
0
 internal void AddCheckBox(Orbwalker.ActiveModes mode, string displayName, string identifier, bool defaultValue)
 {
     MenuDictionary[mode.ToString()].Add(identifier, new CheckBox(displayName, defaultValue));
 }
Beispiel #7
0
 internal int GetValue(Orbwalker.ActiveModes mode, string identifier)
 {
     return(MenuDictionary[mode.ToString()][identifier].Cast <Slider>().CurrentValue);
 }