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


C# Menu.AddStringList方法代码示例

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


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

示例1: Initialize

        internal static void Initialize()
        {
            Loading.OnLoadingComplete += args =>
            {
                config = MainMenu.AddMenu("Target Selector2", "TargetSelector2");

                _configMenu = config;

                config.Add("FocusSelected", new CheckBox("Focus selected target", true));
                config.Add
                    ("ForceFocusSelected", new CheckBox("Only attack selected target", false));
                config.Add
                    ("DrawTarget", new CheckBox("Draw Circle on Selected Target", true));
                config.AddSeparator(10);
                var autoPriorityItem =
                    config.Add("AutoPriority", new CheckBox("Auto arrange priorities", false));
                autoPriorityItem.OnValueChange += AutoPriorityItem_OnValueChange;

                foreach (var enemy in EntityManager.Heroes.Enemies)
                {
                    config.Add
                       ("TargetSelector2" + enemy.ChampionName + "Priority", new Slider(enemy.ChampionName, autoPriorityItem.Cast<CheckBox>().CurrentValue ? GetPriorityFromDb(enemy.ChampionName) : 1, 1, 5));

                    if (autoPriorityItem.Cast<CheckBox>().CurrentValue)
                    {
                        config["TargetSelector2" + enemy.ChampionName + "Priority"].Cast<Slider>().CurrentValue = GetPriorityFromDb(enemy.ChampionName);
                    }
                }
                //config.AddSubMenu(autoPriorityItem);
                config.AddStringList("TargetingMode", "Target Mode", (Enum.GetNames(typeof(TargetingMode))), 0);
                config["TargetingMode"].Cast<Slider>().CurrentValue = 0;
                //config.AddStringList("TargetingMode", "Target Mode", new[] { "AutoPriority", "LowHP", "MostAD", "MostAP", "Closest", "NearMouse", "LessAttack" , "LessCast" }, 0);
                //config["TargetingMode"].Cast<Slider>().CurrentValue = 0;

                //CommonMenu.Config.AddSubMenu(config);
            };
        }
开发者ID:Connerthorpe,项目名称:EloBuddy,代码行数:37,代码来源:TargetSelector2.cs

示例2: Janna

        public Janna()
        {
            frostQueensClaim = new Item(ItemId.Frost_Queens_Claim);

            conf = MainMenu.AddMenu("MoonyJanna", "moonyJanna");

            comboConf = conf.AddSubMenu("ComboMode", "moonyJannaComboConf");
            comboConf.Add("qCombo", new CheckBox("Use Q"));
            comboConf.Add("itemCombo", new CheckBox("Use Frost Queen's Claim"));
            comboConf.Add("wCombo", new CheckBox("Use W"));

            fleeConf = conf.AddSubMenu("FleeMode", "moonyJannaFleeConf");
            fleeConf.Add("qFlee", new CheckBox("Use Q"));
            fleeConf.Add("itemFlee", new CheckBox("Use Frost Queen's Claim"));
            fleeConf.Add("wFlee", new CheckBox("Use W"));

            miscConf = conf.AddSubMenu("Misc", "moonyJannaMiscConf");
            miscConf.Add("qGeneral", new Slider("Use Q if hit at least X targets in general", 2, 0, 5));
            miscConf.AddLabel("0 = disabled");
            miscConf.Add("qInterrupt", new CheckBox("Use Q to interrupt"));
            miscConf.AddStringList("qInterruptDangerLvL", "Q Interruption danger lvl", new [] { "High", "Medium", "Low"}, 1);
            miscConf.Add("qAntiGap", new CheckBox("Use Q against gapclosers"));


            eConf = conf.AddSubMenu("Shielding", "moonyJannaEConf");
            eConf.Add("eSkillShots", new CheckBox("E for skillshots"));
            eConf.Add("eDangerLvl", new Slider("If at dangerlevel", 2, 1, 5));
            eConf.Add("eTargeted", new CheckBox("E for targeted spells"));
            eConf.Add("eDmgProc", new Slider("If % dmg", 15));

            rConf = conf.AddSubMenu("Ultimate", "moonyJannaRConf");
            rConf.Add("rInterrupt", new CheckBox("Use R to interrupt dangerous spells"));
            rConf.Add("rInsec", new KeyBind("Insec to ally", false, KeyBind.BindTypes.HoldActive));
            rConf.AddLabel("Target has to be selected");
            rConf.Add("flashRange", new Slider("Flash Range", 450, 425, 600));
            rConf.Add("extraDist", new Slider("Extra Insec Dist", 150, 50, 300));
            rConf.Add("maxOwnDistToEnemy", new Slider("Max own dist to enemy", 500, 100, 800));

            prioConf = conf.AddSubMenu("AllyPriorities", "moonyJannaPrioConf");
            foreach (AIHeroClient ally in EntityManager.Heroes.Allies)
            {
                prioConf.Add(ally.ChampionName, 
                    new Slider(ally.ChampionName, ally.IsMe ? 1 : TargetSelector.GetPriority(ally), 1, 5));
            }


            skillShotConfig.InitMenu(ref conf);

            var skillshotDetector = new SkillshotDetector(DetectionTeam.EnemyTeam);
            evadePlus = new EvadePlus.EvadePlus(skillshotDetector);

            Game.OnUpdate += GameOnOnUpdate;
            Obj_AI_Base.OnProcessSpellCast += AiHeroClientOnOnProcessSpellCast;
            Interrupter.OnInterruptableSpell += InterrupterOnOnInterruptableSpell;
            Gapcloser.OnGapcloser += GapcloserOnOnGapcloser;
            Drawing.OnDraw += DrawingOnOnDraw;
        }
开发者ID:DanThePman,项目名称:MoonyJanna,代码行数:57,代码来源:Janna.cs


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