Miyagi SetMousePosition        
Print

Following code allows you to set mouse coordinates to a given (x,y).

private void SetMousePosition(int x, int y)
{
   MOIS.MouseState_NativePtr msnp = this.inputMouse.MouseState;
 
   MOIS.Axis_NativePtr anp = msnp.X;
   anp.abs = x;
 
   anp = msnp.Y;
   anp.abs = y;
 
   GuiManager.Singleton.InputManager.InjectMouseMoved(x, y, false);
}

 


Contributors to this page: jacmoe111451 points  and Luismesas .
Page last modified on Sunday 27 of December, 2009 19:57:57 GMT by jacmoe111451 points .


The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.