public EzGUI(float _x, float _y, string _title) { Main = new EzElement(ElementType.CATEGORY, "MAIN_CAT", true); x = _x; y = _y; title = _title; Drawer.Init(this); Game.OnWndProc += Game_OnWndProc; }
public void Count(EzElement cat, ref int i) { foreach (EzElement element in cat.GetElements()) { i++; if (element.Type == ElementType.CATEGORY && element.isActive) { Count(element, ref i); } } }
public void DrawElement(EzElement element, int i, int incat) { byte alpha = 60; if (element.isActive) { alpha = 255; } // int xoffset = 5 * incat; int yoffset = 20; int width = 15; int height = 15; int textoffset = 10; int menuoffset = 15; int twoxoffset = 18; // ColorBGRA color = new ColorBGRA(120, 199, 170, alpha); // element.Position = new float[4] { x + xoffset, x + xoffset + width, y + yoffset * i - menuoffset, y + yoffset * i }; // if (MouseIn(element.Position)) { color.R = 10; } // switch (element.Type) { case ElementType.CATEGORY: Drawer.DrawFilledBox(element.Position[0], element.Position[2], width, height, color); Drawer.DrawShadowText("> " + element.Content, x + xoffset + twoxoffset, element.Position[2], new ColorBGRA(199, 199, 199, 255)); break; case ElementType.CHECKBOX: Drawer.DrawFilledBox(element.Position[0], element.Position[2], width, height, color); Drawer.DrawShadowText(element.Content, x + xoffset + twoxoffset, element.Position[2], new ColorBGRA(199, 199, 199, 255)); break; case ElementType.TEXT: Drawer.DrawShadowText(element.Content, element.Position[0] + textoffset, element.Position[2], new ColorBGRA(199, 199, 199, 255)); break; } }
public void MouseClick(EzElement cat) { foreach (EzElement element in cat.GetElements()) { bool mouseIn = MouseIn(element.Position); if (mouseIn) { element.isActive = !element.isActive; return; } if (element.Type == ElementType.CATEGORY) { if (element.isActive) { MouseClick(element); } } } }
public static void Init() { ui = new EzGUI(Drawing.Width - 350, 60, "AutoArmlet " + VERSION); enabled = new EzElement(ElementType.CHECKBOX, "Enabled / Активен", true); enabledAuto = new EzElement(ElementType.CHECKBOX, "Auto Toggle / Авто армлет [without key]", false); keys = new EzElement(ElementType.CATEGORY, "Key / Клавиша", false); for (int i = 65; (i >= 65 && i <= 91); i++ ) { if (i == 91) i = 32; EzElement element = new EzElement(ElementType.CHECKBOX, ((char)i).ToString(), false); if (i == 32) element.Content = "SPACE"; if ((char)i == 'F') element.isActive = true; keys.AddElement(element); keyDic.Add(i, element); } ui.AddMainElement(enabled); ui.AddMainElement(enabledAuto); ui.AddMainElement(new EzElement(ElementType.TEXT, "Other / Прочее", true)); ui.AddMainElement(keys); Game.OnUpdate += Game_OnUpdate; Game.OnWndProc += Game_OnWndProc; Player.OnExecuteOrder += Player_OnExecuteOrder; }
public static void Init() { Interface = new EzGUI(Drawing.Width - 350, 60, "Ez Unit Control"); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Main", false)); Enabled = new EzElement(ElementType.CHECKBOX, "Enabled", true); Interface.AddMainElement(Enabled); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Main options", false)); UseAbilities = new EzElement(ElementType.CHECKBOX, "Use abilities", true); AttackTarget = new EzElement(ElementType.CHECKBOX, "Attack target (if can)", true); Interface.AddMainElement(AttackTarget); Interface.AddMainElement(UseAbilities); var Moving = new EzElement(ElementType.CATEGORY, "Moving", false); MoveTheSameWayAsHero = new EzElement(ElementType.CHECKBOX, "Move the same way as hero if no target", true); FollowIfNoTarget = new EzElement(ElementType.CHECKBOX, "Follow my hero if no target", false); Moving.AddElement(MoveTheSameWayAsHero); Moving.AddElement(FollowIfNoTarget); MoveTuskSigil = new EzElement(ElementType.CHECKBOX, "Move Tusk Sigil", true); Moving.AddElement(MoveTuskSigil); Interface.AddMainElement(Moving); var Abilities = new EzElement(ElementType.CATEGORY, "Abilities", false); var stoneForms = new EzElement(ElementType.CATEGORY, "StoneForms [Visage]", false); UseStoneForm = new EzElement(ElementType.CHECKBOX, "Use StoneForm", true); stoneForms.AddElement(UseStoneForm); Abilities.AddElement(stoneForms); var primalForms = new EzElement(ElementType.CATEGORY, "PrimalForms [Brewmaster]", false); PrimalForms = new EzElement(ElementType.CHECKBOX, "Use abilities", true); UseHurlBoulder = new EzElement(ElementType.CHECKBOX, "Use Hurl Boulder [EARTH]", true); UseThunderClap = new EzElement(ElementType.CHECKBOX, "Use Thunder Clap [EARTH]", true); UseDispelMagic = new EzElement(ElementType.CHECKBOX, "Use Dispel Magic [STORM]", true); UseCyclone = new EzElement(ElementType.CHECKBOX, "Use Cyclone [STORM]", true); UseDrunkenHaze = new EzElement(ElementType.CHECKBOX, "Use Drunken Haze [STORM]", true); primalForms.AddElement(PrimalForms); primalForms.AddElement(UseHurlBoulder); primalForms.AddElement(UseThunderClap); primalForms.AddElement(UseDispelMagic); primalForms.AddElement(UseCyclone); primalForms.AddElement(UseDrunkenHaze); Abilities.AddElement(primalForms); var neutrals = new EzElement(ElementType.CATEGORY, "Neutrals", false); UseHeal = new EzElement(ElementType.CHECKBOX, "Use Heal [Priest]", true); PriestsHealHero = new EzElement(ElementType.CHECKBOX, "Priests heal hero [Priest]", true); UseIceArmor = new EzElement(ElementType.CHECKBOX, "Use Ice Armor on allied heroes [Ogre Magi]", true); UseIceArmorAllies = new EzElement(ElementType.CHECKBOX, "Use Ice Armor on creeps (his) [Ogre Magi]", false); PriestsHealAlliesCreeps = new EzElement(ElementType.CHECKBOX, "Priests heal allied units (controllable) [Priest]", false); UseChainLightning = new EzElement(ElementType.CHECKBOX, "Use Chain Lightning [Harpy Storm]", true); UseSlam = new EzElement(ElementType.CHECKBOX, "Use Slam [Big Thunder Lizard]", true); UseFrenzy = new EzElement(ElementType.CHECKBOX, "Use Frenzy [Big Thunder Lizard]", true); UseNThunderClap = new EzElement(ElementType.CHECKBOX, "Use Thunder Clap [Ursa Warrior]", true); UseEnsnare = new EzElement(ElementType.CHECKBOX, "Use Ensnare [Troll Warlord]", true); UseWarStomp = new EzElement(ElementType.CHECKBOX, "Use War Stomp [Centaur Khan]", true); UseShockWave = new EzElement(ElementType.CHECKBOX, "Use ShockWave [Hellcaller]", true); neutrals.AddElement(UseHeal); neutrals.AddElement(PriestsHealHero); neutrals.AddElement(PriestsHealAlliesCreeps); neutrals.AddElement(UseIceArmor); neutrals.AddElement(UseIceArmorAllies); neutrals.AddElement(UseChainLightning); neutrals.AddElement(UseSlam); neutrals.AddElement(UseFrenzy); neutrals.AddElement(UseNThunderClap); neutrals.AddElement(UseEnsnare); neutrals.AddElement(UseWarStomp); neutrals.AddElement(UseShockWave); Abilities.AddElement(neutrals); var necronomicon = new EzElement(ElementType.CATEGORY, "Necronomicon", false); UseArcherManaBurn = new EzElement(ElementType.CHECKBOX, "Use Mana Burn [ARCHER]", true); necronomicon.AddElement(UseArcherManaBurn); Abilities.AddElement(necronomicon); Interface.AddMainElement(Abilities); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Chasing", false)); Chasing = new EzElement(ElementType.CHECKBOX, "Current ChasingKey: " + Utils.KeyToText(ChasingKey), false); Interface.AddMainElement(Chasing); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Info", false)); Target = new EzElement(ElementType.TEXT, "Current Target: None", false); Interface.AddMainElement(Target); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Version: 1.0.0.5", true)); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_Invoker_Forged_Spirit); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_Warlock_Golem); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_Venomancer_PlagueWard); SupportedUnits.Add(ClassID.CDOTA_Unit_Brewmaster_PrimalEarth); SupportedUnits.Add(ClassID.CDOTA_Unit_Brewmaster_PrimalFire); SupportedUnits.Add(ClassID.CDOTA_Unit_Brewmaster_PrimalStorm); SupportedUnits.Add(ClassID.CDOTA_Unit_Broodmother_Spiderling); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_Creep); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_Creep_Lane); SupportedUnits.Add(ClassID.CDOTA_Unit_VisageFamiliar); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_Tusk_Sigil); SupportedUnits.Add(ClassID.CDOTA_Unit_SpiritBear); SupportedUnits.Add(ClassID.CDOTA_NPC_WitchDoctor_Ward); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_ShadowShaman_SerpentWard); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_Creep_Neutral); Game.OnUpdate += Game_OnUpdate; Player.OnExecuteOrder += Player_OnExecuteOrder; Game.OnWndProc += Game_OnWndProc; }
public void AddMainElement(EzElement en) { Main.GetElements().Add(en); }
public void AddElement(EzElement element) { Inside.Add(element); }
public void MouseClick(EzElement cat) { foreach (EzElement element in cat.GetElements()) { bool mouseIn = MouseIn(element.Position); if (mouseIn) { element.isActive = !element.isActive; return; } if (element.Type == ElementType.CATEGORY) if (element.isActive) MouseClick(element); } }
public void Count(EzElement cat, ref int i) { foreach (EzElement element in cat.GetElements()) { i++; if (element.Type == ElementType.CATEGORY && element.isActive) Count(element, ref i); } }
public void DrawElement(EzElement element, int i, int incat) { byte alpha = 60; if (element.isActive) alpha = 255; // int xoffset = 5 * incat; int yoffset = 20; int width = 15; int height = 15; int textoffset = 10; int menuoffset = 15; int twoxoffset = 18; // ColorBGRA color = new ColorBGRA(120, 199, 170, alpha); // element.Position = new float[4] { x + xoffset, x + xoffset + width, y + yoffset * i - menuoffset, y + yoffset * i }; // if (MouseIn(element.Position)) color.R = 10; // switch (element.Type) { case ElementType.CATEGORY: Drawer.DrawFilledBox(element.Position[0], element.Position[2], width, height, color); Drawer.DrawShadowText("> " + element.Content, x + xoffset + twoxoffset, element.Position[2], new ColorBGRA(199, 199, 199, 255)); break; case ElementType.CHECKBOX: Drawer.DrawFilledBox(element.Position[0], element.Position[2], width, height, color); Drawer.DrawShadowText(element.Content, x + xoffset + twoxoffset, element.Position[2], new ColorBGRA(199, 199, 199, 255)); break; case ElementType.TEXT: Drawer.DrawShadowText(element.Content, element.Position[0] + textoffset, element.Position[2], new ColorBGRA(199, 199, 199, 255)); break; } }
static void Main(string[] args) { Game.OnUpdate += Game_OnUpdate; Game.OnWndProc += Game_OnWndProc; txt = new Font( Drawing.Direct3DDevice9, new FontDescription { FaceName = "Tahoma", Height = 12, OutputPrecision = FontPrecision.Default, Quality = FontQuality.Default }); not = new Font( Drawing.Direct3DDevice9, new FontDescription { FaceName = "Tahoma", Height = 20, OutputPrecision = FontPrecision.Default, Quality = FontQuality.Default }); gui = new EzGUI(200, 570, "Broodmother#"); toggle = new EzElement(ElementType.CHECKBOX, "Enabled", true); toggleQ = new EzElement(ElementType.CHECKBOX, "Toggle Q", true); toggleLasthit = new EzElement(ElementType.CHECKBOX, "Toggle Lasthit", true); combo = new EzElement(ElementType.CATEGORY, "Combo", true); toggles = new EzElement(ElementType.CATEGORY, "Toggles", true); chasing = new EzElement(ElementType.CHECKBOX, "Chasing", true); combing = new EzElement(ElementType.CHECKBOX, "Combing", true); chasingDisplay = new EzElement(ElementType.TEXT, "Press " + keyCHASING + " for Chasing", false); combingDisplay = new EzElement(ElementType.TEXT, "Press " + keyCOMBO + " for Combing", false); gui.AddMainElement(toggle); gui.AddMainElement(toggles); toggles.AddElement(toggleQ); toggles.AddElement(toggleLasthit); gui.AddMainElement(combo); combo.AddElement(chasing); combo.AddElement(chasingDisplay); combo.AddElement(combing); combo.AddElement(combingDisplay); }
private static void CreateInterface() { Interface = new EzGUI(Drawing.Width - 350, 60, AName); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Main", false)); Enabled = new EzElement(ElementType.CHECKBOX, "Enabled", true); Interface.AddMainElement(Enabled); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Options", false)); // Creeps var creepsCategory = new EzElement(ElementType.CATEGORY, "Creeps", false); CreepsFarm = new EzElement(ElementType.CHECKBOX, "Farm", true); CKillIndicator = new EzElement(ElementType.CHECKBOX, "Marker [-FPS]", true); CKillCountIndicator = new EzElement(ElementType.CHECKBOX, "Show required stacks [-FPS]", false); CKillOnlyRange = new EzElement(ElementType.CHECKBOX, "Farm only in shadow poison range [+FPS]", true); creepsCategory.AddElement(CreepsFarm); creepsCategory.AddElement(CKillIndicator); creepsCategory.AddElement(CKillCountIndicator); creepsCategory.AddElement(CKillOnlyRange); // Heroes var heroesCategory = new EzElement(ElementType.CATEGORY, "Heroes", false); HeroKill = new EzElement(ElementType.CHECKBOX, "Kill", false); HKillIndicator = new EzElement(ElementType.CHECKBOX, "Marker [-FPS]", false); HKillCountIndicator = new EzElement(ElementType.CHECKBOX, "Show required stacks [-FPS]", false); HKillOnlyRange = new EzElement(ElementType.CHECKBOX, "Kill only in shadow poison range [+FPS]", true); heroesCategory.AddElement(HeroKill); heroesCategory.AddElement(HKillIndicator); heroesCategory.AddElement(HKillCountIndicator); heroesCategory.AddElement(HKillOnlyRange); // Interface.AddMainElement(creepsCategory); Interface.AddMainElement(heroesCategory); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Version: " + Release, false)); // offset :3 }