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.

Newcomers DBPro Corner / Double tap input commands

Author
Message
TheShogun
14
Years of Service
User Offline
Joined: 3rd Oct 2010
Location: Texas
Posted: 6th Nov 2011 16:03
How can I make it so that when a button is pressed twice within a period of time that an action is performed? E.g a one-two punch.

I think you achieve this with the timer function, however I am uncertain.
TheShogun
14
Years of Service
User Offline
Joined: 3rd Oct 2010
Location: Texas
Posted: 6th Nov 2011 16:09
Oops sorry there. I did not see TDK's tutorial on Timers. Ignore this.
Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 6th Nov 2011 22:21 Edited at: 6th Nov 2011 22:24
I have set an array to monitor my mouse via a function. Here's the guts of it...



I use IanM's Matrix Utilities HiTimer() to feed the Cache & Delay_Cache variables. Also remember to reset your "Double_Click" back to 0 at the beginning of your mouse function.

By using arrays, it makes it easy for the same function to apply to all of your mouse buttons too. This theory can then be applied to a keyboard too.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia

Login to post a reply

Server time is: 2024-11-24 00:26:27
Your offset time is: 2024-11-24 00:26:27