当前位置: 首页>>代码示例>>C#>>正文


C# Menu.AddItem方法代码示例

本文整理汇总了C#中LeagueSharp.Common.Menu.AddItem方法的典型用法代码示例。如果您正苦于以下问题:C# Menu.AddItem方法的具体用法?C# Menu.AddItem怎么用?C# Menu.AddItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LeagueSharp.Common.Menu的用法示例。


在下文中一共展示了Menu.AddItem方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateMenu

 private static void CreateMenu()
 {
     Menu = new Menu("AIOAuto", "menu", true);
     Menu.AddItem(new MenuItem("timer", "timer")).SetValue(new Slider(500, 200, 5000));
     Menu.AddItem(new MenuItem("dbbuff", "Simple Buff Checker")).SetValue(new KeyBind("T".ToCharArray()[0], KeyBindType.Press, false));
     Menu.AddToMainMenu();
 }
开发者ID:SmokyBot,项目名称:LS,代码行数:7,代码来源:AIOAuto.cs

示例2: AddToMenu

        public static void AddToMenu(Menu menu, List<Spell> spells)
        {
            try
            {
                _menu = menu;

                spells =
                    spells.DistinctBy(s => s.Slot)
                        .Where(s => s.Slot != SpellSlot.Unknown && (s.IsSkillshot || s.Range > 0f))
                        .ToList();

                foreach (var spell in spells)
                {
                    _menu.AddItem(
                        new MenuItem(_menu.Name + "." + spell.Slot, "Use " + spell.Slot).SetValue(
                            spell.Slot != SpellSlot.R && spell.Instance.Cooldown < 20));
                }

                _menu.AddItem(
                    new MenuItem(_menu.Name + ".min-distance", "Min. Enemy Distance").SetValue(
                        new Slider(1000, 200, 3000)));
                _menu.AddItem(new MenuItem(_menu.Name + ".min-mana", "Min. Mana %").SetValue(new Slider(95, 1)));
                _menu.AddItem(new MenuItem(_menu.Name + ".fountain", "Only Inside Fountain").SetValue(false));
                _menu.AddItem(new MenuItem(_menu.Name + ".enabled", "Enabled").SetValue(false));

                _spells = spells.OrderBy(s => s.ManaCost).ThenBy(s => s.Instance.Cooldown).ToList();
                Core.OnPostUpdate += OnCorePostUpdate;
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
开发者ID:Lizzaran,项目名称:LeagueSharp-Standalones,代码行数:33,代码来源:TearStackManager.cs

示例3: AddToMenu

        public static void AddToMenu(Menu theMenu)
        {
            _myMenu = theMenu;

            //add item list to menu
            CreateList();

            var offensiveItem = new Menu("Offensive Items", "Offensive Items");
            {
                foreach (var item in ItemList)
                {
                    AddOffensiveItem(offensiveItem, item);
                }
                _myMenu.AddSubMenu(offensiveItem);
            }

            var summoners = new Menu("Summoners", "Summoners");
            {
                var ignite = new Menu("Ignite", "Ignite");
                {
                    ignite.AddItem(new MenuItem("ignite", "Use Ignite", true).SetValue(true));
                    ignite.AddItem(
                        new MenuItem("igniteMode", "Ignite Mode", true).SetValue(new StringList(new[] { "Combo", "KS" })));
                    summoners.AddSubMenu(ignite);
                }
                _myMenu.AddSubMenu(summoners);
            }

            Orbwalking.AfterAttack += AfterAttack;
            Orbwalking.OnAttack += OnAttack;
            Game.OnUpdate += Game_OnGameUpdate;
        }
开发者ID:fgpmaia123,项目名称:LeagueSharp-18,代码行数:32,代码来源:ActiveItems.cs

示例4: SFXUtility

        public SFXUtility()
        {
            try
            {
                Menu = new Menu(Name, Name, true);

                var miscMenu = new Menu("Misc", "Misc");

                var infoMenu = new Menu("Info", "Info");
                infoMenu.AddItem(new MenuItem("InfoVersion", string.Format("Version: {0}", Version)));
                infoMenu.AddItem(new MenuItem("InfoIRC", "IRC: Appril"));
                infoMenu.AddItem(new MenuItem("InfoGithub", "Github:").SetValue(new StringList(new[]
                {
                    "Smokyfox",
                    "Lizzaran",
                    "zUsername"
                })));

                miscMenu.AddSubMenu(infoMenu);

                miscMenu.AddItem(new MenuItem("MiscCircleThickness", "Circles Thickness").SetValue(new Slider(3, 10, 1)));

                Menu.AddSubMenu(miscMenu);
                AppDomain.CurrentDomain.DomainUnload += OnExit;
                AppDomain.CurrentDomain.ProcessExit += OnExit;
                CustomEvents.Game.OnGameEnd += OnGameEnd;
                Game.OnGameEnd += OnGameEnd;
                CustomEvents.Game.OnGameLoad += OnGameLoad;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
开发者ID:09samed09,项目名称:LeagueSharp2,代码行数:34,代码来源:SFXUtility.cs

示例5: CreateConfigMenu

        public override void CreateConfigMenu()
        {
            combo = new Menu("Combo", "Combo");
            combo.AddItem(new MenuItem("CUSEQ", "Use Q").SetValue(true));
            combo.AddItem(new MenuItem("CUSEW", "Use W").SetValue(false));
            combo.AddItem(new MenuItem("CUSERHIT", "Use R If Enemies >=").SetValue(new Slider(2, 2, 5)));

            harass = new Menu("Harass", "Harass");
            harass.AddItem(new MenuItem("HUSEQ", "Use Q").SetValue(true));
            harass.AddItem(new MenuItem("HUSEW", "Use W").SetValue(true));
            harass.AddItem(new MenuItem("HMANA", "Min. Mana Percent").SetValue(new Slider(50, 0, 100)));

            misc = new Menu("Misc", "Misc");
            misc.AddItem(new MenuItem("MAUTOQ", "Auto Harass Q").SetValue(true));
            misc.AddItem(new MenuItem("MAUTOQIMMO", "Auto Q Immobile Target").SetValue(true));
            misc.AddItem(new MenuItem("MAUTOWIMMO", "Auto W Immobile Target").SetValue(true));

            m_evader = new Evader(out evade, EvadeMethods.MorganaE);

            Config.AddSubMenu(combo);
            Config.AddSubMenu(harass);
            Config.AddSubMenu(evade);
            Config.AddSubMenu(misc);
            Config.AddToMainMenu();

            base.OrbwalkingFunctions[(int)Orbwalking.OrbwalkingMode.Combo] += Combo;
            base.OrbwalkingFunctions[(int)Orbwalking.OrbwalkingMode.Mixed] += Harass;
            base.BeforeOrbWalking += BeforeOrbwalk;
        }
开发者ID:47110572,项目名称:LeagueSharp,代码行数:29,代码来源:Morgana.cs

示例6: Init

        public static void Init(Menu MenuParent)
        {
            MenuLocal = new Menu("Settings", "Settings");
            MenuParent.AddSubMenu(MenuLocal);

            MenuSpellW = new Menu("W:", "SettingsW").SetFontStyle(FontStyle.Regular, Champion.PlayerSpells.Q.MenuColor());
            {
                MenuSpellW.AddItem(new MenuItem("Set.W.Hitchance", "Hitchance:").SetValue(new StringList(new[] {"Medium", "High", "Veryhigh"}, 2)));
                MenuLocal.AddSubMenu(MenuSpellW);
            }

            MenuSpellR = new Menu("R:", "SettingsR").SetFontStyle(FontStyle.Regular, Champion.PlayerSpells.Q.MenuColor());
            {
                MenuSpellR.AddItem(new MenuItem("Set.R.Hitchance", "Hitchance:").SetValue(new StringList(new[] { "Medium", "High", "Veryhigh" }, 2)));
                MenuSpellR.AddItem(new MenuItem("Set.R.JungleSteal", "Baron / Dragon Steal:").SetValue(true));
                MenuSpellR.AddItem(new MenuItem("Set.R.BaseUlti", "Base Ulti:").SetValue(true));
                MenuSpellR.AddItem(new MenuItem("Set.R.Ping", "Ping for Killable Enemy (Local):").SetValue(new StringList(new[] { "Off", "Fallback", "Danger" }, 2)));
                MenuLocal.AddSubMenu(MenuSpellR);
            }

            MenuFlame = new Menu("Flame", "Flame");
            MenuFlame.AddItem(new MenuItem("Flame.Laugh", "After Kill:").SetValue(new StringList(new[] {"Off", "Joke", "Taunt", "Laugh", "Random"}, 4)));
            MenuFlame.AddItem(new MenuItem("Flame.Ctrl6", "After Kill: Show Champion Point Icon (Ctrl + 6)").SetValue(new StringList(new[] { "Off", "On" })));

            Modes.ModeBaseUlti.Init(MenuLocal);
            // Common.CommonManaManager.Init(MenuLocal);
        }
开发者ID:CjShu,项目名称:JINX,代码行数:27,代码来源:ModeSettings.cs

示例7: ComboMenu

        private void ComboMenu()
        {
            string prefix = "koreanolaf.combomenu";
            Menu comboMenu = new Menu("Combo", prefix);

            comboMenu.AddItem(new MenuItem(prefix + ".useq", "Use Q").SetValue(true)).ValueChanged += (sender, args) =>
            { olafSpells.Q.UseOnCombo = args.GetNewValue<bool>(); };

            comboMenu.AddItem(new MenuItem(prefix + ".usew", "Use W").SetValue(true)).ValueChanged += (sender, args) =>
            { olafSpells.W.UseOnCombo = args.GetNewValue<bool>(); };

            comboMenu.AddItem(new MenuItem(prefix + ".usee", "Use E").SetValue(true)).ValueChanged += (sender, args) =>
            { olafSpells.E.UseOnCombo = args.GetNewValue<bool>(); };

            //comboMenu.AddItem(new MenuItem(prefix + ".user", "Use R").SetValue(true)).ValueChanged += (sender, args) =>
            //{ olafSpells.R.UseOnCombo = args.GetNewValue<bool>(); };

            string useItemsPrefix = prefix + ".items";
            Menu useItems = new Menu("Use Items", useItemsPrefix);

            useItems.AddItem(new MenuItem(useItemsPrefix + ".bilgewater", "Use Bilgewater Cutlass").SetValue(true));
            useItems.AddItem(new MenuItem(useItemsPrefix + ".botrk", "Use BotRK").SetValue(true));
            useItems.AddItem(new MenuItem(useItemsPrefix + ".yomuus", "Use Yoomuu's GhostBlade").SetValue(true));
            useItems.AddItem(new MenuItem(useItemsPrefix + ".hydra", "Use Hydra").SetValue(true));
            useItems.AddItem(new MenuItem(useItemsPrefix + ".tiamat", "Use Tiamat").SetValue(true));

            comboMenu.AddSubMenu(useItems);
            MainMenu.AddSubMenu(comboMenu);
        }
开发者ID:47110572,项目名称:LeagueSharp-9,代码行数:29,代码来源:OlafMenu.cs

示例8: Game_OnGameLoad

        private static void Game_OnGameLoad(EventArgs args)
        {
            Menu = new Menu("Waypoint Tracker", "WaypointTracker", true);
            Menu.AddItem(new MenuItem("Enabled", "Enabled").SetValue(true));
            Menu.AddItem(
                new MenuItem("HeroDistance", "Min Hero Distance from Player").SetValue(new Slider(500, 100, 1000)));
            Menu.AddItem(
                new MenuItem("WaypointDistance", "Max Waypoint Distance from Player").SetValue(new Slider(100, 0, 300)));
            Menu.AddItem(new MenuItem("Time", "Draw Arrival Time").SetValue(true));
            Menu.AddItem(new MenuItem("Name", "Draw Champ Name").SetValue(false));

            var heroMenu = Menu.AddSubMenu(new Menu("Heroes", "Heroes"));

            foreach (var hero in ObjectManager.Get<Obj_AI_Hero>().Where(h => h.IsEnemy))
            {
                heroMenu.AddItem(new MenuItem(hero.ChampionName, "Draw " + hero.ChampionName).SetValue(true));

                Circles.Add(hero, new Render.Circle(new Vector3(0, 0, 0), 50, Color.Color.Red, 2));
                Circles[hero].Visible = false;
                Circles[hero].Add();

                Text.Add(hero, new Render.Text(new Vector2(0, 0), "", 20, SharpDX.Color.White));
                Text[hero].Visible = false;
                Text[hero].Add();
            }

            Menu.AddToMainMenu();

            Game.OnUpdate += Game_OnUpdate;
        }
开发者ID:tr33s,项目名称:LeagueSharpRequests,代码行数:30,代码来源:Program.cs

示例9: FarmMenu

 public override void FarmMenu(Menu config)
 {
     config.AddItem(new MenuItem("UseQWC", "Use Q WC").SetValue(true));
     config.AddItem(new MenuItem("useEFarm", "E").SetValue(new StringList(new[] { "Freeze", "WaveClear", "Both", "None" }, 2)));
     config.AddItem(new MenuItem("JungleActive", "JungleActive!").SetValue(new KeyBind("C".ToCharArray()[0], KeyBindType.Press)));
     config.AddItem(new MenuItem("UseQJung", "Use Q").SetValue(true));
 }
开发者ID:CupidL0ve,项目名称:LeagueSharp,代码行数:7,代码来源:Singed.cs

示例10: getSkilshotMenu

        public static Menu getSkilshotMenu()
        {
            //Create the skillshots submenus.
                var skillShots = new Menu("敌人技能", "aShotsSkills");

                foreach (var hero in ObjectManager.Get<Obj_AI_Hero>())
                {
                    if (hero.Team != ObjectManager.Player.Team)
                    {
                        foreach (var spell in SpellDatabase.Spells)
                        {
                            if (spell.ChampionName == hero.ChampionName)
                            {
                                var subMenu = new Menu(spell.MenuItemName, spell.MenuItemName);

                                subMenu.AddItem(
                                    new MenuItem("DangerLevel" + spell.MenuItemName, "危险等级").SetValue(
                                        new Slider(spell.DangerValue, 5, 1)));

                                subMenu.AddItem(
                                    new MenuItem("IsDangerous" + spell.MenuItemName, "危险的行为").SetValue(
                                        spell.IsDangerous));

                                subMenu.AddItem(new MenuItem("Draw" + spell.MenuItemName, "标示").SetValue(true));
                                subMenu.AddItem(new MenuItem("Enabled" + spell.MenuItemName, "启动").SetValue(true));

                                skillShots.AddSubMenu(subMenu);
                            }
                        }
                    }
                }
                return skillShots;
        }
开发者ID:Jackie-Tian,项目名称:LLLL,代码行数:33,代码来源:YasuoSharp.cs

示例11: Game_OnGameLoad

        private static void Game_OnGameLoad(EventArgs args)
        {
            menu = new Menu("Utility+", "UtilityPlus", true);

            Menu pluginMenu = new Menu("PluginList", "PluginList");            
            pluginMenu.AddItem(new MenuItem("LoadSpellTracker", "Load SpellTracker Plugin").SetValue(true));
            pluginMenu.AddItem(new MenuItem("LoadWardTracker", "Load WardTracker Plugin").SetValue(true));
            pluginMenu.AddItem(new MenuItem("LoadTowerRange", "Load TowerRange Plugin").SetValue(true));
            pluginMenu.AddItem(new MenuItem("LoadPluginDescription", "    -- Reload to take effect --"));

            menu.AddSubMenu(pluginMenu);
            menu.AddToMainMenu();

            if (menu.Item("LoadSpellTracker").GetValue<bool>())
            {
                spellTracker = new SpellTracker.Tracker(menu);
            }

            if (menu.Item("LoadWardTracker").GetValue<bool>())
            {
                wardTracker = new WardTracker.Tracker(menu);
            }

            if (menu.Item("LoadTowerRange").GetValue<bool>())
            {
                towerRange = new TowerRange.RangeIndicator(menu);
            }
        }
开发者ID:aikoy,项目名称:ezEvade,代码行数:28,代码来源:Program.cs

示例12: CreateConfigMenu

        public override void CreateConfigMenu()
        {
            Menu combo = new Menu("Combo", "SAutoCarry.Jhin.Combo");
            combo.AddItem(new MenuItem("SAutoCarry.Jhin.Combo.UseQ", "UseQ").SetValue(true));
            combo.AddItem(new MenuItem("SAutoCarry.Jhin.Combo.UseW", "Use W").SetValue(true)).ValueChanged += (s, ar) => ConfigMenu.Item("SAutoCarry.Jhin.Combo.UseWMarked").Show(ar.GetNewValue<bool>());
            combo.AddItem(new MenuItem("SAutoCarry.Jhin.Combo.UseWMarked", "Use W Only If Target Is Marked").SetValue(true)).Show(combo.Item("SAutoCarry.Jhin.Combo.UseW").GetValue<bool>());
            combo.AddItem(new MenuItem("SAutoCarry.Jhin.Combo.UseEImmobile", "Use E Immobile Targets").SetValue(true));
            combo.AddItem(new MenuItem("SAutoCarry.Jhin.Combo.UseEDashing", "Use E Dashing Targets").SetValue(true));
            combo.AddItem(new MenuItem("SAutoCarry.Jhin.Combo.UseR", "Use R Shoots If Ult Activated").SetValue(true));

            Menu harass = new Menu("Harass", "SAutoCarry.Jhin.Harass");
            harass.AddItem(new MenuItem("SAutoCarry.Jhin.Harass.UseQ", "Use Q").SetValue(true));
            harass.AddItem(new MenuItem("SAutoCarry.Jhin.Harass.UseW", "Use W").SetValue(true));
            harass.AddItem(new MenuItem("SAutoCarry.Jhin.Harass.Toggle", "Toggle Harass").SetValue(new KeyBind('T', KeyBindType.Toggle)));

            Menu misc = new Menu("Misc", "SAutoCarry.Jhin.Misc");
            misc.AddItem(new MenuItem("SAutoCarry.Jhin.Misc.AdjustW", "Adjust W Range").SetValue(new Slider(1000, 0, 2500))).ValueChanged += (s, ar) => Spells[W].Range = ar.GetNewValue<Slider>().Value;
            misc.AddItem(new MenuItem("SAutoCarry.Jhin.Misc.AdjustR", "Adjust R Range").SetValue(new Slider(1000, 0, 3500))).ValueChanged += (s, ar) => Spells[R].Range = ar.GetNewValue<Slider>().Value;
            misc.AddItem(new MenuItem("SAutoCarry.Jhin.Misc.KillStealRW", "KillSteal").SetValue(false));

            ConfigMenu.AddSubMenu(combo);
            ConfigMenu.AddSubMenu(harass);
            ConfigMenu.AddSubMenu(misc);
            ConfigMenu.AddToMainMenu();
        }
开发者ID:JelloBeans,项目名称:SAC,代码行数:25,代码来源:Jhin.cs

示例13: Combo

 public override void Combo(Menu config)
 {
     config.AddItem(new MenuItem("comboQ", "Use Q").SetValue(true));
     config.AddItem(new MenuItem("comboW", "Use W").SetValue(true));
     config.AddItem(new MenuItem("comboE", "Use E Automatically").SetValue(true));
     config.AddItem(new MenuItem("comboR", "Use R").SetValue(true));
 }
开发者ID:LSharpAura,项目名称:LeagueSharp,代码行数:7,代码来源:Jinx.cs

示例14: OnLoad

        public static void OnLoad(Menu RootMenu)
        {
            var TranslationsMenu = new Menu("[VHR] Translations", "dz191.vhr.translations");
            {
                var LanguageList = Variables.languageList.Select(language => language.GetName()).ToArray();
                TranslationsMenu.AddItem(
                    new MenuItem("dz191.vhr.translations.language", "Language: ").SetValue(
                        new StringList(LanguageList, 0)));
                TranslationsMenu.AddItem(
                    new MenuItem("dz191.vhr.translations.select", "Translate!").SetValue(false)).ValueChanged +=
                    (sender, args) =>
                    {
                        if (!args.GetNewValue<bool>())
                        {
                            return;
                        }

                        ChangeLanguage(Variables.Menu.Item("dz191.vhr.translations.language").GetValue<StringList>().SelectedValue);

                        LeagueSharp.Common.Utility.DelayAction.Add(250, () =>
                        {
                                                    TranslationsMenu.Item("dz191.vhr.translations.select").SetValue(false);
                        });
                    };
                RootMenu.AddSubMenu(TranslationsMenu);
            }
        }
开发者ID:DZ191,项目名称:LeagueSharp,代码行数:27,代码来源:TranslationInterface.cs

示例15: _BuildMenu

        private static void _BuildMenu()
        {
            MainMenu = new Menu("PingMe", "MainMenu", true);

            var allyMenu = new Menu("Allies", "allyMenu");
            {
                allyMenu.AddItem(new MenuItem("sep0", "-- Note : 0% = disable"));
                foreach(var ally in Allies)
                {
                    allyMenu.AddItem(new MenuItem("ally" + ally.ChampionName + "HPPERCENT", ally.ChampionName + " HP%")).SetValue<Slider>(new Slider(20, 0, 100));
                }
                MainMenu.AddSubMenu(allyMenu);
            }

            var enemyMenu = new Menu("Ennemies", "enemyMenu");
            {
                enemyMenu.AddItem(new MenuItem("sep1", "-- Note : 0% = disable"));
                foreach (var enemy in Ennemies)
                {
                    enemyMenu.AddItem(new MenuItem("enemy" + enemy.ChampionName + "HPPERCENT", enemy.ChampionName + " HP%")).SetValue<Slider>(new Slider(20, 0, 100));
                }
                MainMenu.AddSubMenu(enemyMenu);
            }

            MainMenu.AddItem(new MenuItem("PingAlly", "Ping locally when an ally is low", true).SetValue<Boolean>(false));
            MainMenu.AddItem(new MenuItem("PingEnemy", "Ping locally when an enemy is low", true).SetValue<Boolean>(true));
            if (hasTP) MainMenu.AddItem(new MenuItem("TpPing", "Ping if TP is up", true).SetValue<Boolean>(true));
            if (hasLongRangeUlt) MainMenu.AddItem(new MenuItem("UltPing", "Ping if R is up", true).SetValue<Boolean>(true));
            MainMenu.AddToMainMenu();
        }
开发者ID:Brikovich,项目名称:LeagueSharp,代码行数:30,代码来源:Program.cs


注:本文中的LeagueSharp.Common.Menu.AddItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。