Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / How to delay a mouse click

Author
Message
Scope 51791
16
Years of Service
User Offline
Joined: 25th Jul 2008
Location:
Posted: 6th Aug 2008 22:11 Edited at: 6th Aug 2008 22:13
Once again I have came across a problem. There is a number with an up arrow and bottom arrow next to it. You click the arrows and the number goes up and down. But when I click one of the arrows, the number changes really fast. for dbMouseClick() you have to click it really fast to just change one number. Here is my code so far:



Is there some way I can delay it from going on to the next number?
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 6th Aug 2008 22:42
That's because all your testing is whether the mouse is in a clicked state, that is, the button is down. If you detect the click but the button is still down the next time you check the status it will still show clicked. You need to track whether or not the mouse has been clicked and disregard any subsequent clicks until the button has been released.

Check out my Mouse class somewhere else in this forum. If the class itself isn't immediately useful some of the code may be.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
elantzb
16
Years of Service
User Offline
Joined: 10th May 2008
Location: Classified
Posted: 7th Aug 2008 03:58 Edited at: 7th Aug 2008 03:59
throwing a timer of sorts may help if he doesnt want to have to lift the mouse and click again



~you can call me lantz~

Login to post a reply

Server time is: 2024-11-20 17:47:07
Your offset time is: 2024-11-20 17:47:07