Sign in to follow this  
Knight52

XNA 4.0: mouse location is not what it should be

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
[quote name='Knight52' timestamp='1306418960' post='4816044']
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?
[/quote]

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.

[img]http://i579.photobucket.com/albums/ss231/hhygyulg/MyFirstRPG2011-05-2621-29-23-65.jpg[/img]





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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this