Jump to content
  • Advertisement

Archived

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

SnAkE

Tutorial 23 - Mousesupport

This topic is 6667 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''ve read tut23 and now I wonder how to check if the player presses one of the mouse-buttons. So I understand how to check the mouse position, but I dont know how to figur out if the Mousebutton 1 or two is pressed!? It would be nice if someone could post the code to do it ;-)

Share this post


Link to post
Share on other sites
Advertisement
add this to your main switch statement



case WM_LBUTTONDOWN:
blabla;
break;
case WM_RBUTTONDOWN:
blabla;
break;
case WM_LBUTTONUP:
blabla;
break;
case WM_RBUTTONUP:
blabla;
break;

obviously blabla is the code to handle them, use it like a keyboard routine


-TipTup
TipTup.Com

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!