Show Cursor

Jan 24, 2013 at 5:34 AM

I cannot locate a method or property that I can use to display my mouse cursor on the pc but have a feeling it is somewhere.  Ive looked through the CHM


Can anyone help me please.

Jan 24, 2013 at 5:47 AM

Look for the two related variables:



Both of these variables are accessible via the UpdateState's input structure. My code is slightly modified so yours might be a bit off, but it can be accessed via:

state.PlayerInput[0].InputMapper.MouseVisible where state is UpdateState

Hope that works.

Jan 24, 2013 at 6:04 AM
Edited Jan 24, 2013 at 6:04 AM

Thank you that absolutely solves my problem.  You are the best.

Incidentally while waiting for a reply I was able to get my cursor but your solution is what I realy needed.  What I managed to do was

private Microsoft.Xna.Framework.Game game; = (Microsoft.Xna.Framework.Game)this;

//and inside Update

game.IsMouseVisible = true;
but I have a feeling this was ultimately fighting the system every update. Your solution is the proper way, Thank you.