This project is read-only.

Mouse Position Bug

Nov 6, 2012 at 1:46 AM
Edited Nov 6, 2012 at 3:44 AM

First, I want to say that this control has been really useful, so thanks!  

I was creating a level editor using the control to render things and I noticed a bug regarding mouse position.  If you print line the mouse position, you'll notice the output doesn't match the 0, 0 to the corner of the xna window.  I made a tweak to my copy of the source code to fix it...

Inside XNAControl.XNAControlGame...

public XNAControlGame(IntPtr windowHandle, string contentRoot) : base()


        Microsoft.Xna.Framework.Input.Mouse.WindowHandle = windowHandle; //my fix

        m_windowHandle = windowHandle;




Edit:  Whoops, didn't see this was already in the issue tracker.  Turns out this fix doesn't actually fix everything.

Edit2: I found out how to resolve the issue I was having.  The solution can be found in the issue tracker related to this.