Jump to content
  • Advertisement

Archived

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

PCI

Mouse Buttons

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

How can I use the mouse buttons, is there a tutorial about the place anywhere? I just wanna make it so that when the left mouse button is pressed it flashs a yellow lightinto the level (like a gun shot)

Share this post


Link to post
Share on other sites
Advertisement
So should I create a bool variable like keys and check wParam or what should I do next ?

I don''t use glut.

Share this post


Link to post
Share on other sites
Wow... glad I looked before I posted a duplicate thread.... I have a similar ??
I am using direct input and I assume I can track mouse clicks and moves using DI, but I am unsure how. I would like to convert some of the code in the tutorials to use the mouse to move forward instead of the arrow keys, but I have been unable to locate any info on how to do it. Could I be mistaken and DI only supports keyboard actions and not the mouse ?
Any links to source or a kind soul that would like to pound out the details here would be great.


Thanks in advance
datool

Edited by - datoolman on March 17, 2001 11:10:22 PM

Share this post


Link to post
Share on other sites
An easy way:
if(GetAsyncKeyState(VK_LBUTTON))
//left mouse button is down
if(GetAsyncKeyState(VK_RBUTTON))
//right mouse button is down

Share this post


Link to post
Share on other sites
Props to Prosper and Quantum ! One simple line of code and it works like a charm ! Do you have any links to a DI command list ?



Thanks again

datool

Edited by - datoolman on March 17, 2001 11:43:52 PM

Edited by - datoolman on March 17, 2001 11:44:12 PM

Share this post


Link to post
Share on other sites
Hi,

See on my site : http://slug-production.ibelgique.com

I''ve a little example who use the mouse without Glut and Direct-X.

Choose "Download" section.

========================
Leyder Dylan
Site : http://slug-production.ibelgique.com
E-Mail : dylan.leyder@ibelgique.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!