15

I am developing a game for windows store (desktops) using monogame framework. everything else is working excellent except the Mouse cursor which is working well but not showing at time of playing game.

    protected override void Update(GameTime gameTime)
     {
        // TODO: Add your update logic here
        TouchCollection touch = TouchPanel.GetState();
        ms = Mouse.GetState();
        if (ms.LeftButton == ButtonState.Pressed)
        {
            Debug.WriteLine("pressedddddd");
        }


    }

you can see above code ... i am getting ouptut in output window "pressed" but i cant see the cursor on screen i am developing this on windows 8.1 pc and visual studio 2013 using monogame

pravin
  • 454
  • 1
  • 6
  • 19
  • 1
    You should try to look on google before asking questions. Simply set this.IsMouseVisible = true at initialization. – deathismyfriend Mar 20 '14 at 15:11
  • i already checked on google actually but got nothing useful . bdw yours works well. plz post it in ans – pravin Mar 20 '14 at 15:34
  • 4
    MonoGame and XNA have the same API so when you google this stuff try including xna as a keyword. for example "show mouse cursor xna" turned up loads of results. – craftworkgames Mar 20 '14 at 20:13
  • https://www.google.nl/search?q=show+mousecursor+xna&oq=show+mousecursor+xna&aqs=chrome..69i57j0l5.6508j0j7&sourceid=chrome&espv=210&es_sm=93&ie=UTF-8 – Madmenyo Mar 22 '14 at 15:08

1 Answers1

39

Put the below in the initialization function to make the mouse visible.

    this.IsMouseVisible = true;
deathismyfriend
  • 2,182
  • 2
  • 18
  • 25