private void _frameTimer_OnFrame(FrameTimer timer, D2DDevice device) { // the render loop will call device.BeginScene() and device.EndScene() for us if (!device.IsDrawing) { _initializeGraphicObjects = true; return; } // clear the scene / fill it with our background device.ClearScene(_backgroundColor); // text // the background is dynamically adjusted to the text's size device.DrawTextWithBackground("FPS: " + device.FramesPerSecond, 10, 10, _font, _redBrush, _blackBrush); // primitives device.DrawCircle(100, 100, 50, 2.0f, _redBrush); device.DrawDashedCircle(250, 100, 50, 2.0f, _greenBrush); // Rectangle.Create offers a method to create rectangles with x, y, width, heigth device.DrawRectangle(Rectangle.Create(350, 50, 100, 100), 2.0f, _blueBrush); device.DrawRoundedRectangle(RoundedRectangle.Create(500, 50, 100, 100, 6.0f), 2.0f, _redBrush); device.DrawTriangle(650, 150, 750, 150, 700, 50, _greenBrush, 2.0f); // lines device.DrawLine(50, 175, 750, 175, 2.0f, _blueBrush); device.DrawDashedLine(50, 200, 750, 200, 2.0f, _redBrush); // outlines & filled device.OutlineCircle(100, 275, 50, 4.0f, _redBrush, _blackBrush); device.FillCircle(250, 275, 50, _greenBrush); device.OutlineRectangle(Rectangle.Create(350, 225, 100, 100), 4.0f, _blueBrush, _blackBrush); _gradient.SetRange(500, 225, 600, 325); device.FillRoundedRectangle(RoundedRectangle.Create(500, 225, 100, 100, 6.0f), _gradient); device.FillTriangle(650, 325, 750, 325, 700, 225, _greenBrush); // images device.DrawImage(_image, 310, 375); }
private void _frameTimer_OnFrame(FrameTimer timer, D2DDevice device) { // the render loop will call device.BeginScene() and device.EndScene() for us if (!device.IsDrawing) { _initializeGraphicObjects = true; return; } // clear the scene / fill it with our background device.ClearScene(_backgroundColor); if (!CanDraw) { return; } // text // the background is dynamically adjusted to the text's size var esp = Program.IsEspEnabled ? '+' : '-'; var radar = Program.IsRadarEnabled ? '+' : '-'; var trigger = Program.IsTriggerBot ? '+' : '-'; var aim = Program.IsAimEnabled ? '+' : '-'; var cross = Program.IsCrosshairDraw ? '+' : '-'; var bunny = Program.IsBunnyHopEnabled ? '+' : '-'; device.DrawTextWithBackground( $"Fps: {device.FramesPerSecond} [ Esp(F5): {esp} ] [ Radar(F6): {radar} ] [ Trigger(F7): {trigger} ] [ Aim(F8): {aim} ] [ Cross(F9): {cross} ] [ Bunny(F10): {bunny} ]", 10, 50, _font, _redBrush, _blackBrush); if (IsInGame()) { if (LocalPlayer == null) { return; } device.DrawTextWithBackground( $"Me: (Map: {_mapName}) {Closed?.Name} {LocalPlayer.Health} {LocalPlayer.Team} {LocalPlayer.Position} Max:{MaxPlayersOnMap}", 10, 80, _font, _redBrush, _blackBrush); if (Program.IsCrosshairDraw) { device.FillCircle(_sizeX / 2f, _sizeY / 2f, Fov, _blueBrush); device.DrawCrosshair(CrosshairStyle.Plus, new Point(_sizeX / 2f, _sizeY / 2f), 15, 1, _blackBrush); } foreach (var justEntity in ListOfGlow.ToList()) { try { var w2S = justEntity.W2SPosition; if (w2S.X <= 0 || w2S.Y <= 0 || w2S.X >= Program.ScreenSize.X || w2S.Y >= Program.ScreenSize.Y) { continue; } /*if (Program.IsEspEnabled) * { * var classId = justEntity.ClassId; * * device.DrawTextWithBackground($"[{classId}]", w2S.X, w2S.Y, _font, _redBrush, * _blackBrush); * }*/ } catch (Exception e) { } } } else { device.DrawTextWithBackground($"Not in game", 10, 70, _font, _redBrush, _blackBrush); } return; // primitives device.DrawCircle(100, 100, 50, 2.0f, _redBrush); device.DrawDashedCircle(250, 100, 50, 2.0f, _greenBrush); // Rectangle.Create offers a method to create rectangles with x, y, width, heigth device.DrawRectangle(Rectangle.Create(350, 50, 100, 100), 2.0f, _blueBrush); device.DrawRoundedRectangle(RoundedRectangle.Create(500, 50, 100, 100, 6.0f), 2.0f, _redBrush); device.DrawTriangle(650, 150, 750, 150, 700, 50, _greenBrush, 2.0f); // lines device.DrawLine(50, 175, 750, 175, 2.0f, _blueBrush); device.DrawDashedLine(50, 200, 750, 200, 2.0f, _redBrush); // outlines & filled device.OutlineCircle(100, 275, 50, 4.0f, _redBrush, _blackBrush); device.FillCircle(250, 275, 50, _greenBrush); device.OutlineRectangle(Rectangle.Create(350, 225, 100, 100), 4.0f, _blueBrush, _blackBrush); _gradient.SetRange(500, 225, 600, 325); device.FillRoundedRectangle(RoundedRectangle.Create(500, 225, 100, 100, 6.0f), _gradient); device.FillTriangle(650, 325, 750, 325, 700, 225, _greenBrush); // images //device.DrawImage(_image, 310, 375); }