Ejemplo n.º 1
0
 private void ResizeWindow(Graphics gfx)
 {
     // 窗口移动跟随
     windowData     = Memory.GetGameWindowData();
     _window.X      = windowData.Left;
     _window.Y      = windowData.Top;
     _window.Width  = windowData.Width;
     _window.Height = windowData.Height;
     gfx.Resize(_window.Width, _window.Height);
 }
Ejemplo n.º 2
0
    public Overlay()
    {
        windowData = Memory.GetGameWindowData();
        Memory.SetForegroundWindow();

        /////////////////////////////////////////////

        _brushes = new Dictionary <string, SolidBrush>();
        _fonts   = new Dictionary <string, Font>();

        var gfx = new Graphics()
        {
            VSync      = Settings.Overlay.VSync,
            MeasureFPS = true,
            PerPrimitiveAntiAliasing  = true,
            TextAntiAliasing          = true,
            UseMultiThreadedFactories = true
        };

        _window = new GraphicsWindow(windowData.Left, windowData.Top, windowData.Width, windowData.Height, gfx)
        {
            FPS       = Settings.Overlay.FPS,
            IsTopmost = true,
            IsVisible = true
        };

        _window.DestroyGraphics += _window_DestroyGraphics;
        _window.DrawGraphics    += _window_DrawGraphics;
        _window.SetupGraphics   += _window_SetupGraphics;

        var thread0 = new Thread(AimbotThread);

        thread0.IsBackground = true;
        thread0.Start();

        var thread1 = new Thread(IsDrawGameOverlay);

        thread1.IsBackground = true;
        thread1.Start();
    }