Jump to content
  • Advertisement
Sign in to follow this  
fallout01

Tracking mouse movement

This topic is 5128 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

Hi, So my problem is, I need keep track of the mouse coordinates while a moust button (say the left button) is being pressed. So I need to keep track of x0,y0,x1,y1 When a user fist clicks the mouse button, x0 and y0 become that position. (This is easy enough) Now, the user must hold the mouse button down and move the mouse (like a drag and drop/click and drag). While the user is moving the mouse, I need to continually be getting feedback of the current mouse position. IE x1,y1 must be getting continually updated to the current mouse position. I don't know how to continually be getting the current mouse position while the mouse button is down. I can only seem to get the position of the initial click. Does anybody know how to accomplish this? (the mouse function is being called using: glutMouseFunc( mouseFunc ) from main ) Thanks.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!