|
what's the function to check the mouse click? |
Vijay K
Member #7,668
August 2006
|
hi, i'm having lots of images like options or radio buttons, what i want to do is i want to select the option on click on that position? my code is int onoffflg = 1; int optionss() if(mouse_b) i'm calling this function and it's working but what it does is when i click the images are changing but too quickly but once i click completely i.e a click and a release it is working properly but when the mouse is in click (only a pressdown) the images are changing, what should i do here? help me on this... Regards, |
Ceagon Xylas
Member #5,495
February 2005
|
if(mouse_b&1) |
Vijay K
Member #7,668
August 2006
|
hi , i tried that one but still happening in the same way.. i call that options inside a while loop while(!key[KEY_ESC]){ } would this cause the probs? Regards, |
kronoman
Member #2,911
November 2002
|
this happens because the mouse button is not released fast enough
let me know if it works... |
miran
Member #2,407
June 2002
|
The proper way is to remember that the mouse button has been click and then look for the release. Sample code:
-- |
Arthur Kalliokoski
Second in Command
February 2005
|
http://www.allegro.cc/manual/api/mouse-routines/mouse_callback You could have this callback keep track of how long it's been since the last click for doubleclick capability as well as signaling button press/release. They all watch too much MSNBC... they get ideas. |
|