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


C# Menu.AddLabeledSlider方法代码示例

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


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

示例1: Init

        public static void Init()
        {
            InsecMenu = Program.menu.AddSubMenu("Insec Settings");
            InsecMenu.AddGroupLabel("Insec Settings");
            InsecMenu.AddLabeledSlider("insecPositionMode", "Insec Position Mode",
                new[] {"Ally Position", "Game Cursor", "Selected Unit"});
            InsecMenu.AddLabeledSlider("insecTargetMode", "Insec Targeting Mode", new[] {"Click", "TargetSelector"});
            InsecMenu.Add("useFlash", new CheckBox("Use Flash in Insec?", false));
            InsecMenu.Add("checkAllUnits", new CheckBox("Check Other Units for Insec"));
            InsecMenu.Add("insecDistance", new Slider("Insec Distance", 200, 100, 350));
            var insec = InsecMenu.Add("insecActive",
                new KeyBind("Insec Active", false, KeyBind.BindTypes.HoldActive, 'T'));
            var wtfsec = InsecMenu.Add("wtfsecActive",
                new KeyBind("WTFSec Active", false, KeyBind.BindTypes.HoldActive, 'Y'));

            Game.OnWndProc += Game_OnWndProc;
            Drawing.OnDraw += Drawing_OnDraw;
            Obj_AI_Base.OnProcessSpellCast += AIHeroClient_OnProcessSpellCast;
            

            Game.OnTick += delegate
            {
                if (!InsecActive || LastUpdate + 200 <= Environment.TickCount)
                {
                    InsecPos = new Vector3();
                }

                InsecActive = false;
                WtfSecActive = false;

                if (insec.CurrentValue)
                {
                    if(Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee)) Chat.Print("LeeSinBuddy - Flee Is Active! Change the Insec or Flee Keybind or it will not go well.", Color.BlueViolet);
                    InsecActive = true;
                    Insec();
                }
                else if (wtfsec.CurrentValue)
                {
                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee)) Chat.Print("LeeSinBuddy - Flee Is Active! Change the WTFSec or Flee Keybind or it will not go well.", Color.BlueViolet);
                    InsecActive = true;
                    WtfSecActive = true;
                    WtfSec();
                }
            };
        }
开发者ID:tingtop747,项目名称:Elobuddy-Addons,代码行数:45,代码来源:InsecManager.cs

示例2: Init

        public static void Init()
        {
            InsecMenu = Program.menu.AddSubMenu("Insec Settings");
            InsecMenu.AddGroupLabel("Insec Settings");
            InsecMenu.AddLabeledSlider("insecPosMode", "Insec Position Mode",
                new[] {"Ally Position", "Game Cursor", "Selected Unit"}, 1);
            InsecMenu.AddLabeledSlider("insecTargetMode", "Insec Targeting Mode", new[] {"Click", "TargetSelector"});
            InsecMenu.Add("useFlash", new CheckBox("Use Flash in Insec?", false));
            InsecMenu.Add("checkAllUnits", new CheckBox("Check Other Units for Insec", true));
            var insec = InsecMenu.Add("insecActive",
                new KeyBind("Insec Active", false, KeyBind.BindTypes.HoldActive, 'T'));
            var wtfsec = InsecMenu.Add("wtfsecActive",
                new KeyBind("WTFSec Active", false, KeyBind.BindTypes.HoldActive, 'Y'));

            Game.OnWndProc += Game_OnWndProc;
            Drawing.OnDraw += Drawing_OnDraw;
            Obj_AI_Base.OnProcessSpellCast += AIHeroClient_OnProcessSpellCast;

            Game.OnTick += delegate
            {
                if (!InsecActive || LastUpdate + 200 <= Environment.TickCount)
                {
                    InsecPos = new Vector3();
                }

                InsecActive = false;

                if (insec.CurrentValue)
                {
                    InsecActive = true;
                    Insec();
                }
                else if (wtfsec.CurrentValue)
                {
                    InsecActive = true;
                    WtfSec();
                }
            };
        }
开发者ID:ibaddie,项目名称:Elobuddy-Addons,代码行数:39,代码来源:InsecManager.cs


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