示例#1
0
        /// <summary>
        ///     Adds all menu items.
        /// </summary>
        public void Generate()
        {
            if (this.Menu == null)
            {
                return;
            }

            var menuItems = new List <MenuItem>()
            {
                new MenuItem("DontDashUnderTurret", "Don't dash under turret").SetValue(false),
                new MenuItem("AutoWalkToDash", "[WIP > Disabled] Auto-Walk to dash").SetValue(true)
                .SetTooltip(
                    "If this is enabled the assembly will auto-walk behind a unit to dash over it."),
                new MenuItem("AutoDashing", "Auto-Dash dashable PathBase (Dashing-PathBase)")
                .SetValue(true)
                .SetTooltip(
                    "If this is enabled the assembly will automatic pathfind and walk to the end of the PathBase. This is a basic feature of pathfinding."),
                new MenuItem("AutoWalking", "[WIP > Disabled] Auto-Walk non-dashable PathBase (Walking-PathBase)")
                .SetValue(false)
                .SetTooltip(
                    "If this is enabled the assembly will automatic pathfind and walk to the end of the PathBase. If you like to have maximum control or your champion disable this."),
                new MenuItem("PathAroundSkillShots", "[WIP > Disabled] Try to PathBase around Skillshots")
                .SetValue(true)
                .SetTooltip(
                    "if this is enabled, the assembly will PathBase around a skillshot if a PathBase is given."),
                new MenuItem("Enabled", "Enabled").SetValue(true),
            };

            this.blacklistMenu = new BlacklistMenu(this.Settings, "Blacklist");

            foreach (var item in menuItems)
            {
                item.Name = this.Menu.Name + item.Name;

                this.Settings.AddItem(item);
            }

            foreach (var item in this.Settings.Items)
            {
                if (item.Name == "Mode")
                {
                    var stringarray = item.GetValue <StringList>().SList;

                    var id = 0;

                    for (var i = 0; i < stringarray.Count(); i++)
                    {
                        if (stringarray[i] == "Enemy")
                        {
                            id = i + 1;
                        }
                    }

                    foreach (var item2 in this.blacklistMenu.AttachedMenu.Items)
                    {
                        item2.SetTag(id);
                    }

                    break;
                }
            }

            this.Blacklist         = this.blacklistMenu.AttachedMenu;
            this.BlacklistedHeroes = this.blacklistMenu.BlacklistedHeroes;

            this.Menu.AddSubMenu(this.Settings);
        }
示例#2
0
        /// <summary>
        ///     Adds all menu items.
        /// </summary>
        public void Generate()
        {
            var selecter = new MenuItem("Mode", "Dash to: ").SetValue(new StringList(new[] { "Mouse", "Enemy" }));

            var mouse = new List <MenuItem>()
            {
            };

            var enemy = new List <MenuItem>()
            {
                new MenuItem("Prediction", "Use Prediction").SetValue(true)
                .SetTooltip("The assembly will try to E to the enemy predicted position."),
                new MenuItem("PredictionEnhanced", "Prediction -> Two PathBase System").SetValue(true)
                .SetTooltip("The assembly will try to E to the enemy predicted position."),
                new MenuItem("MinCursorDistance", "Min Cursor Distance to target").SetValue(
                    new Slider(600, 50, 2000)),
            };

            this.dynamicMenu = new DynamicMenu(this.Menu, this.DisplayName, selecter, new[] { mouse, enemy });

            this.dynamicMenu.Initialize();

            var both = new List <MenuItem>()
            {
                new MenuItem("DontDashUnderTurret", "Don't dash under turret").SetValue(true),
                new MenuItem("AutoWalkToDash", "[Experimental] Auto-Walk to dash").SetValue(true)
                .SetTooltip(
                    "If this is enabled the assembly will auto-walk behind a unit to dash over it."),
                new MenuItem("AutoDashing", "[Experimental] Auto-Dash dashable PathBase (Dashing-PathBase)")
                .SetValue(true)
                .SetTooltip(
                    "If this is enabled the assembly will automatic pathfind and walk to the end of the PathBase. This is a basic feature of pathfinding."),
                new MenuItem("AutoWalking", "[Experimental] Auto-Walk non-dashable PathBase (Walking-PathBase)")
                .SetValue(false)
                .SetTooltip(
                    "If this is enabled the assembly will automatic pathfind and walk to the end of the PathBase. If you like to have maximum control or your champion disable this."),
                new MenuItem("PathAroundSkillShots", "[Experimental] Try to PathBase around Skillshots")
                .SetValue(true)
                .SetTooltip(
                    "if this is enabled, the assembly will PathBase around a skillshot if a PathBase is given."),
                new MenuItem("Enabled", "Enabled").SetValue(true),
            };

            this.blacklistMenu = new BlacklistMenu(this.dynamicMenu.AttachedMenu, "Blacklist");

            foreach (var item in both)
            {
                item.Name = this.dynamicMenu.AttachedMenu.Name + item.Name;

                this.dynamicMenu.AttachedMenu.AddItem(item);
            }

            foreach (var item in this.dynamicMenu.AttachedMenu.Items)
            {
                if (item.Name == "Mode")
                {
                    var stringarray = item.GetValue <StringList>().SList;

                    var id = 0;

                    for (var i = 0; i < stringarray.Count(); i++)
                    {
                        if (stringarray[i] == "Enemy")
                        {
                            id = i + 1;
                        }
                    }

                    foreach (var item2 in this.blacklistMenu.AttachedMenu.Items)
                    {
                        item2.SetTag(id);
                    }

                    break;
                }
            }

            this.Settings          = this.dynamicMenu.AttachedMenu;
            this.Blacklist         = this.blacklistMenu.AttachedMenu;
            this.BlacklistedHeroes = this.blacklistMenu.BlacklistedHeroes;
        }