Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

jimiwa

directinput-- mouse up

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

for direct input I need to know how to tell when the mouse button goes up. (using a define) also I would like to know how you know if the mouse button is clicked - i.e. when it goes down and then up.

Share this post


Link to post
Share on other sites
Advertisement
it depends.

based on your question it sounds like you need to use buffered data collection from the mouse, so you can get "state" changes.

you would read the buffer and then loop through the states to see what state it has gone back and forth (up down up down)

If you do immediate mode then you could lose "states"(clicks) if your don''t sample incredibly fast.

I would look at the mouse tutorial in the SDK for how to do this.

Reading DirectInput is easy and the mouse state structure that show the UP/Down state of the mouse buttons.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!