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
ClickToggle AS BOOLEAN
MoveTimerSet AS FLOAT
MoveTimer AS FLOAT
MoveTimerSet = 100
MoveTimer = TIMER()
ClickToggle = 0
Do
CLS
x = 0
IF MOUSECLICK() = 1
IF ClickToggle = 1
x = 1
ELSE
ClickToggle = 1
MoveTimer = TIMER()
ENDIF
ENDIF
IF TIMER() - MoveTimer > MoveTimerSet
ClickToggle = 0
ENDIF
PRINT x
Loop
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.