I have written a Custom mouse, with a Custom sprite, using
MouseState, and getting the X and Y variables. However i also have a camera that i wrote, and this allows me to leave the initial box. One sprite that can freely move this area, but my mouse gets stuck in a box that seems proportional to my screen resolution some times.
//This is where i create the Texture, Vector and MouseState of the Custom Cursor Texture2D Mouse_texture; MouseState mouse_state; Vector2 Mouse_pos; // This is my Resolution and i have IsFullScreen = true graphics.PreferredBackBufferWidth = 1600; graphics.PreferredBackBufferHeight = 900; // Loading the Texture Mouse_texture = Content.Load<Texture2D>("mouse"); // Getting the current mouse State this is in the update function mouse_state = Mouse.GetState(); // How i set the mouse position Simple Vector2 stuff and i never do anything else // to handle the the position of the mouse Mouse_pos = new Vector2(mouse_state.X, mouse_state.Y); // and this is me Drawing it spriteBatch.Draw(Mouse_texture, Mouse_pos, Color.White);
If you need any more code let me know