Jump to content

  • Log In with Google      Sign In   
  • Create Account

danromeo

Member Since 18 May 2001
Offline Last Active Yesterday, 10:32 PM
-----

#4962762 XNA: Changing text that follows mouse cursor?

Posted by danromeo on 24 July 2012 - 04:27 PM

It bears saying for others who may read this post that the above method is absolutely the wrong way to implement a custom cursor because the system cursor normally updates many times faster than the graphic device and your cursor will flash when your frame rate slows down.

In this case, because I require changing text to track the mouse cursor, it appears to be the only way to do it. For any normal type of custom mouse cursor, and even for cursors with 256 colors and animated cursors, THIS is the way to do it....changes the actual system cursor, rather than hiding it and replacing it with a graphic that displays many times slower: http://allenwp.com/blog/2011/04/04/changing-the-windows-mouse-cursor-in-xna/.

There is nothing "horribly inefficient" in my code. I'm simply trying to do something a little out of the ordinary.


#4962648 XNA: Changing text that follows mouse cursor?

Posted by danromeo on 24 July 2012 - 10:27 AM

I think when you hid the cursor and replaced it with a Texture2D that you effectively slowed your mouse updates down to the speed of the game updates. In this case the cursor performance might be unacceptably slow in a graphically intense game.

My saving grace here would be that this particular screen is not that graphically intense.....so you may be right. I'll give it a shot!


PARTNERS