Archived

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

PCI

Mouse Buttons

Recommended Posts

PCI    122
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
PCI    122
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
datoolman    122
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
Quantum    122
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
datoolman    122
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
Leyder Dylan    122
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