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 / Mouse Button Clicking

Author
Message
Hadou
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 20th Sep 2008 19:06
Im currently working on the interaction between sprites, using them to create 2d buttons. The problem that I am having, is interacting between the colliding sprites and the mouse button.

Im curretnly working on 2 small sectons of code;

1. Code Required to Dectect a double Click



Meaning that if the mouse is clicked withing 0.1second of the first, a Dclick should be Dectected, I 'Think' the problem is that because the Click() updates so fast, it assumes that every click is a double click.

Am I right? And is there anyway in which to stop this problem? perhaps a delay of somesorts,

The Drag code, will be something like.. if x = 1 for sometime, then Hold = Yes...

Thanks guys.
Zergei
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location: Everywhere
Posted: 20th Sep 2008 21:39
This an old function a made a while ago. Might help you.

http://forum.thegamecreators.com/?m=forum_view&t=87741&b=6

Further on my stuff at...
TurboSquid.com
The3dStudio.com
Hadou
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 20th Sep 2008 22:38 Edited at: 20th Sep 2008 23:41
Thanks alot mate ill take a look at it now, then let you know how I get on with it.

Thats a nice bit of code mate, just spent like an hour looking over it, still dont really have a clue, how it works... but ill keep looking at it lol.

Login to post a reply

Server time is: 2024-11-24 20:06:51
Your offset time is: 2024-11-24 20:06:51