|
Problems with the mouse |
arthur arthur
Member #7,336
June 2006
|
Hello, i'll try to explain my problem simply : i want to detect a mouse left click (easy), but detect just a "click" (which means mouse left button down, then released). i've tried that : but the printf is but until the left button is released. does anybody got an answer for me please ? thx for all ! |
Niunio
Member #1,975
March 2002
|
Try this:
----------------- |
Tobias Dammers
Member #2,604
August 2002
|
Hackish solution: if (mouse_b & 1) { printf("Left mouse button pressed\n"); while (mouse_b & 1) poll_mouse(); // not strictly necessary, but can't hurt either } Note that this locks your application until the mouse button is released, so a more sophisticated approach would be:
--- |
|