private void SetPosition(Vector pos) { #if !WINRT && !WINDOWS_PHONE // Not supported on WinRT... only sets xna coords Vector screenpos = pos.Transform(screen.GetScreenInverse()); XnaV2 center = ScreenView.ToXnaCoords(screenpos, screen.ViewportSize, Vector.Zero); XnaMouse.SetPosition((int)center.X, (int)center.Y); #endif }
/// <summary> /// Sets the position of the mouse /// </summary> /// <param name="position">The new position of the mouse</param> public static void SetPosition(Vector2 position) { XnaMouse.SetPosition((int)position.X, (int)position.Y); }