Пример #1
0
 private void createChildMenus(BooleanButton parent, SettingsBlock module)
 {
     foreach (ISetting setting in module.Members.Where(setting => !String.IsNullOrWhiteSpace(setting.Key)))
     {
         if (setting is Setting <bool> )
         {
             parent.AddChild(new BooleanButton(Settings, setting.Key, setting as Setting <bool>));
         }
         else if (setting is Setting <Color> )
         {
             parent.AddChild(new ColorPicker(Settings, setting.Key, setting as Setting <Color>));
         }
         else if (setting is SettingsBlock)
         {
             var sm = setting as SettingsForModule;
             var c  = new BooleanButton(Settings, setting.Key, sm == null ? null : sm.Enabled);
             parent.AddChild(c);
             createChildMenus(c, setting as SettingsBlock);
         }
         if (setting is SettingIntRange)
         {
             var sir = setting as SettingIntRange;
             parent.AddChild(new IntPicker(Settings, setting.Key, sir));
         }
     }
 }
Пример #2
0
        private BooleanButton AddButton(BooleanButton parent, string text, string setting)
        {
            BooleanButton booleanButton = new BooleanButton(text, setting);

            parent.AddChild(booleanButton);
            return(booleanButton);
        }
Пример #3
0
        private void CreateButtons()
        {
            this.buttons = new List <BooleanButton>();
            BooleanButton parent         = this.CreateRootMenu("Health bars", 0, "Healthbars");
            BooleanButton booleanButton  = this.AddButton(parent, "Players", "Healthbars.Players");
            BooleanButton parent2        = this.AddButton(parent, "Enemies", "Healthbars.Enemies");
            BooleanButton booleanButton2 = this.AddButton(parent, "Minions", "Healthbars.Minions");

            this.AddButton(parent, "Show ES", "Healthbars.ShowES");
            this.AddButton(parent, "Show in town", "Healthbars.ShowInTown");
            booleanButton.AddChild(new IntPicker("Width", 50, 180, "Healthbars.Players.Width"));
            booleanButton.AddChild(new IntPicker("Height", 10, 50, "Healthbars.Players.Height"));
            booleanButton2.AddChild(new IntPicker("Width", 50, 180, "Healthbars.Minions.Width"));
            booleanButton2.AddChild(new IntPicker("Height", 10, 50, "Healthbars.Minions.Height"));
            BooleanButton booleanButton3 = this.AddButton(parent2, "White", "Healthbars.Enemies.Normal");

            booleanButton3.AddChild(new IntPicker("Width", 50, 180, "Healthbars.Enemies.Normal.Width"));
            booleanButton3.AddChild(new IntPicker("Height", 10, 50, "Healthbars.Enemies.Normal.Height"));
            BooleanButton booleanButton4 = this.AddButton(parent2, "Magic", "Healthbars.Enemies.Magic");

            booleanButton4.AddChild(new IntPicker("Width", 50, 180, "Healthbars.Enemies.Magic.Width"));
            booleanButton4.AddChild(new IntPicker("Height", 10, 50, "Healthbars.Enemies.Magic.Height"));
            BooleanButton booleanButton5 = this.AddButton(parent2, "Rare", "Healthbars.Enemies.Rare");

            booleanButton5.AddChild(new IntPicker("Width", 50, 180, "Healthbars.Enemies.Rare.Width"));
            booleanButton5.AddChild(new IntPicker("Height", 10, 50, "Healthbars.Enemies.Rare.Height"));
            BooleanButton booleanButton6 = this.AddButton(parent2, "Uniques", "Healthbars.Enemies.Unique");

            booleanButton6.AddChild(new IntPicker("Width", 50, 180, "Healthbars.Enemies.Unique.Width"));
            booleanButton6.AddChild(new IntPicker("Height", 10, 50, "Healthbars.Enemies.Unique.Height"));
            BooleanButton parent3 = this.CreateRootMenu("Minimap icons", 1, "MinimapIcons");

            this.AddButton(parent3, "Monsters", "MinimapIcons.Monsters");
            this.AddButton(parent3, "Minions", "MinimapIcons.Minions");
            this.AddButton(parent3, "Strongboxes", "MinimapIcons.Strongboxes");
            this.AddButton(parent3, "Chests", "MinimapIcons.Chests");
            this.AddButton(parent3, "Alert items", "MinimapIcons.AlertedItems");
            BooleanButton parent4 = this.CreateRootMenu("Item alert", 2, "ItemAlert");

            this.AddButton(parent4, "Rares", "ItemAlert.Rares");
            this.AddButton(parent4, "Uniques", "ItemAlert.Uniques");
            this.AddButton(parent4, "Currency", "ItemAlert.Currency");
            this.AddButton(parent4, "Maps", "ItemAlert.Maps");
            this.AddButton(parent4, "RGB", "ItemAlert.RGB");
            this.AddButton(parent4, "Crafting bases", "ItemAlert.Crafting");
            this.AddButton(parent4, "Skill gems", "ItemAlert.SkillGems");
            this.AddButton(parent4, "Play sound", "ItemAlert.PlaySound");
            BooleanButton booleanButton7 = this.AddButton(parent4, "Show text", "ItemAlert.ShowText");

            booleanButton7.AddChild(new IntPicker("Font size", 6, 30, "ItemAlert.ShowText.FontSize"));
            BooleanButton tooltip = this.CreateRootMenu("Advanced tooltips", 3, "Tooltip");

            this.AddButton(tooltip, "Item level on hover", "Tooltip.ShowItemLevel");
            this.AddButton(tooltip, "Item mods on hover", "Tooltip.ShowItemMods");
            BooleanButton parent5 = this.CreateRootMenu("Boss warnings", 4, "DangerAlert");

            this.AddButton(parent5, "Sound warning", "DangerAlert.PlaySound");
            BooleanButton booleanButton8 = this.AddButton(parent5, "Text warning", "DangerAlert.ShowText");

            booleanButton8.AddChild(new IntPicker("Font size", 6, 30, "DangerAlert.ShowText.FontSize"));
            booleanButton8.AddChild(new IntPicker("Background alpha", 0, 200, "DangerAlert.ShowText.BgAlpha"));
            BooleanButton booleanButton9 = this.CreateRootMenu("Xph Display", 5, "XphDisplay");

            booleanButton9.AddChild(new IntPicker("Font size", 6, 30, "XphDisplay.FontSize"));
            booleanButton9.AddChild(new IntPicker("Background alpha", 0, 200, "XphDisplay.BgAlpha"));
            BooleanButton parent6 = this.CreateRootMenu("Client hacks", 6, "ClientHacks");

            this.AddButton(parent6, "Maphack", "ClientHacks.Maphack");
            this.AddButton(parent6, "Zoomhack", "ClientHacks.Zoomhack");
            this.AddButton(parent6, "Fullbright", "ClientHacks.Fullbright");
            BooleanButton booleanButton10 = this.CreateRootMenu("Preload Alert", 7, "PreloadAlert");

            booleanButton10.AddChild(new IntPicker("Font size", 6, 30, "PreloadAlert.FontSize"));
            booleanButton10.AddChild(new IntPicker("Background alpha", 0, 200, "PreloadAlert.BgAlpha"));
            // BooleanButton closeWithGame = this.CreateRootMenu("Exit when game is closed", 8, "ExitWithGame");
        }
Пример #4
0
 private void createChildMenus(BooleanButton parent, SettingsBlock module)
 {
     foreach (ISetting setting in module.Members.Where(setting => !String.IsNullOrWhiteSpace(setting.Key)))
     {
         if( setting is Setting<bool>)
             parent.AddChild(new BooleanButton(Settings, setting.Key, setting as Setting<bool>));
         else if (setting is Setting<Color>)
             parent.AddChild(new ColorPicker(Settings, setting.Key, setting as Setting<Color>));
         else if (setting is SettingsBlock)
         {
             var sm = setting as SettingsForModule;
             var c = new BooleanButton(Settings,setting.Key, sm == null ? null : sm.Enabled);
             parent.AddChild(c);
             createChildMenus(c, setting as SettingsBlock);
         }
         if (setting is SettingIntRange)
         {
             var sir = setting as SettingIntRange;
             parent.AddChild(new IntPicker(Settings, setting.Key, sir));
         }
     }
 }