• Advertisement
Sign in to follow this  

XNA 4.0: mouse location is not what it should be

This topic is 2462 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm making a game and suddenly ( I swear, suddenly) mouse's location went... off.

Normally, location of the mouse at top-left corner of the windows should be (0,0), but suddenly when I was coding something completely irrelevant to mouse, it's just got off. I don't know where to look. I tried to undo what I was coding but it doesn't work. Can you give me some ideas where to look?

Share this post


Link to post
Share on other sites
Advertisement

I'm making a game and suddenly ( I swear, suddenly) mouse's location went... off.

Normally, location of the mouse at top-left corner of the windows should be (0,0), but suddenly when I was coding something completely irrelevant to mouse, it's just got off. I don't know where to look. I tried to undo what I was coding but it doesn't work. Can you give me some ideas where to look?


How do you know it's off? You really have to give some more specific details about what is happening.

Share this post


Link to post
Share on other sites
Buttons.

When mouse is where that button should be highlighted, it isn't.

Here's image when Windows pointer was exactly at top-left corner of game's window. Cursor you see is in-game one. that two numbers at first button is the location of the mouse game detected.

MyFirstRPG2011-05-2621-29-23-65.jpg





EDIT : Never mind. I found where went wrong. I inherited a class with Game1. That created a conflict up.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement