Esempio n. 1
0
    public void SetCoursorPosition(Vector3 mousePos)
    {
        GameCursor.POINT lpPoint = new GameCursor.POINT(0, 0);

        GameCursor.ClientToScreen(this.windowPtr, ref lpPoint);
        GameCursor.GetWindowRect(this.windowPtr, ref this.winRect);
        GameCursor.POINT point = new GameCursor.POINT(lpPoint.X - this.winRect.left, lpPoint.Y - this.winRect.top);
        lpPoint.X = (int)mousePos.x;
        lpPoint.Y = Screen.get_height() - (int)mousePos.y;
        GameCursor.ClientToScreen(this.windowPtr, ref lpPoint);
        GameCursor.SetCursorPos(lpPoint.X + point.X, lpPoint.Y + point.Y);
    }
Esempio n. 2
0
 private static extern bool GetCursorPos(out GameCursor.POINT lpPoint);
Esempio n. 3
0
 private static extern bool ClientToScreen(IntPtr hWnd, ref GameCursor.POINT lpPoint);