Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mouse cursor is not showing in windows store game developing using monogame

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

like image 268
pravin Avatar asked Mar 20 '14 14:03

pravin


People also ask

How do I enable game cursor?

To find your hidden cursor, open your mouse properties and go to the Pointer Options tab. Now, enable the checkbox that says “Show location of pointer when I press the Ctrl key.” Click Apply and then click OK. After that, whenever you press the Ctrl key, Windows will show its location on your screen.

How do I hide the cursor on my MSI app player?

Once you're in the game, press “F1” on your keyboard to hide your cursor.


1 Answers

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

    this.IsMouseVisible = true;
like image 95
deathismyfriend Avatar answered Oct 12 '22 17:10

deathismyfriend