protected virtual void OnDraw(EventArgs args) { var comboPanelItem = TextPanelMenu.ComboPanelItem; var unitComboPanelItem = TextPanelMenu.UnitComboPanelItem; if (comboPanelItem || unitComboPanelItem) { var position = TextPanelMenu.Position.Value; if (PanelMove.ActivateMove) { var movePosition = position - new Vector2(5); var text = PanelMove.Time.ToString(); var textMinSize = new Vector2(Math.Min(Size.X, Size.Y)); var sizeText = Drawing.MeasureText(text, "Arial", textMinSize, FontFlags.AntiAlias); Drawing.DrawText(text, "Arial", movePosition + ((Size / 2) - (sizeText / 2)), textMinSize, new Color(255, 255, 255, 50), FontFlags.AntiAlias); Drawing.DrawRect(movePosition, Size, Color.WhiteSmoke, true); } var isCombo = ComboMenu.ComboHotkeyItem; if (comboPanelItem) { if (isCombo) { Text($"Combo ON", position, Color.Aqua); } else { Text($"Combo OFF", position, Color.Yellow); } if (WithMuteMenu.ToggleHotkeyItem) { Text($"With Mute ON", position + new Vector2(0, 30), Color.Aqua); } else { Text($"With Mute OFF", position + new Vector2(0, 30), Color.Yellow); } position = position + new Vector2(0, 60 + ComboPanelMore); } if (unitComboPanelItem) { if (UnitComboMenu.ToggleHotkeyItem) { Text("Unit Combo Lock", position, Color.Aqua); } else if (isCombo) { Text("Unit Combo ON", position, Color.Aqua); } else { Text("Unit Combo OFF", position, Color.Yellow); } if (UnitControlMenu.FollowToggleHotkeyItem) { Text($"Unit Follow ON", position + new Vector2(0, 30), Color.Aqua); } else { Text($"Unit Follow OFF", position + new Vector2(0, 30), Color.Yellow); } if (UnitFarmMenu.ToggleHotkeyItem) { Text($"Unit Farm {UnitFarmMenu.AreaItem}", position + new Vector2(0, 60), Color.Aqua); } else { Text($"Unit Farm OFF", position + new Vector2(0, 60), Color.Yellow); } } } if (!SettingsMenu.DisableDamageCalculationItem) { foreach (var data in BaseDamageCalculation.DamageDate) { var hero = data.GetHero; var health = data.GetHealth; var canBeCastedDamage = data.GetCanBeCastedDamage; var hpBarPosition = HUDInfo.GetHpBarPosition(hero); var hpBarSizeX = HUDInfo.HpBarSizeX; var hpBarSizeY = HUDInfo.HpBarSizeY / 2.3f; var hpBarPos = hpBarPosition + new Vector2(0, hpBarSizeY + 1.8f); if (hpBarPosition.IsZero) { continue; } if (DamageCalculationMenu.HpBarItem) { var canHitDamage = data.GetCanHitdamage; var maximumHealth = hero.MaximumHealth; var canBeCastedDamageBar = Math.Max(canBeCastedDamage, 0) / maximumHealth; if (canBeCastedDamageBar > 0) { var canBeCastedDamagePos = Math.Max(health - canBeCastedDamage, 0) / maximumHealth; var canBeCastedDamagePosition = new Vector2(hpBarPos.X + ((hpBarSizeX + canBeCastedDamageBar) * canBeCastedDamagePos), hpBarPos.Y); var canBeCastedDamageSize = new Vector2(hpBarSizeX * (canBeCastedDamageBar + Math.Min(health - canBeCastedDamage, 0) / maximumHealth), hpBarSizeY); var canBeCastedDamageeColor = ((float)health / maximumHealth) - canBeCastedDamageBar > 0 ? new Color(100, 0, 0, 200) : new Color(191, 255, 0, 200); Drawing.DrawRect(canBeCastedDamagePosition, canBeCastedDamageSize, canBeCastedDamageeColor); Drawing.DrawRect(canBeCastedDamagePosition, canBeCastedDamageSize, Color.Black, true); } var canHitDamageBar = Math.Max(canHitDamage, 0) / maximumHealth; if (canHitDamageBar > 0) { var canHitDamagePos = Math.Max(health - canHitDamage, 0) / maximumHealth; var canHitDamagePosition = new Vector2(hpBarPos.X + ((hpBarSizeX + canHitDamageBar) * canHitDamagePos), hpBarPos.Y); var canHitDamageSize = new Vector2(hpBarSizeX * (canHitDamageBar + Math.Min(health - canHitDamage, 0) / maximumHealth), hpBarSizeY); var canHitDamageColor = ((float)health / maximumHealth) - canHitDamageBar > 0 ? new Color(0, 255, 0) : Color.Aqua; Drawing.DrawRect(canHitDamagePosition, canHitDamageSize, canHitDamageColor); Drawing.DrawRect(canHitDamagePosition, canHitDamageSize, Color.Black, true); } } if (DamageCalculationMenu.ValueItem) { var damage = health - (int)canBeCastedDamage; var color = damage > 0 ? Color.WhiteSmoke : Color.Aqua; Drawing.DrawText($"{damage} ({(int)canBeCastedDamage})", "Calibri Bold", hpBarPosition + new Vector2(hpBarSizeX + (25 * HUDInfo.RatioPercentage), 0), new Vector2(17) * HUDInfo.RatioPercentage, color, FontFlags.AntiAlias); } } } }