G'day
I have been trying to code a function to record mouse clicks so for example
click 0 = no click
click 1 = left mouse button down
click 2 = A single left click (left mouse button down then released)
etc
But I'm just completely lost. Here is an exert of the code which is only partly done and just set up for a simple visual resualt for me to see if its working
FUNCTION checkForMouseClicks()
IF (MOUSECLICK()= 1)
click = 1 // Left Btn is Down
ENDIF
IF (MOUSECLICK() = 0)
IF (click = 1)
click = 2 // Left Btn Was Released (Single click)
ENDIF
ENDIF
TEXT 0, 420, "Click is: " + STR$(click)
ENDFUNCTION
The problem seems to be that click never reches 2. It starts at 0 like it should then goes to 1 when i press the left mouse btn down ... but then back to zero when i release it.
I have rewritten this handling function so many time now its not funny. Its probably something obvious but i just can't pick it. Was hopin' a fresh set of eyes could help.
Any help would be extremely appreciated.
Thanx in adavance
Only those who have been through Hell can see Heaven.