| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#J)
The Detect Touchscreen Release command detects when the touchscreen has been "released",
eg your finger has been removed from the screen. If you remove your finger from
the screen before the #J command, then a very short ( < 10 milliseconds)
time results, allowing Cogsys to catch "premature release" events.
At "screen release", a '&' is written to the output, as well as the number of
milliseconds since the #J command was encountered.
#J
#J
command is encountered.
Cogsys variable 7 (COGVAR_KEY) is
updated with '&'. Cogsys variable 5
(COGVAR_TIME) is updated with the release time.
%M2
@C
%A[X320,Y100,J2,F1]
#G[Testing touchscreen "release"]#W1000
#T[F,320,240,50]#T[S,220,240,50]
%A[X320,Y240,J2,F1,C15]#G[+]
%A[Y150]#G[Touch the '+']#T[F]@C
#G[Wait...]#W1500@C
%A[Y50]#G[Touch the square]
%X[squarext.cxr]
%I[1,50,-100,0]%J[1,1,1]
#J
$AV120=V5
#I(V5<10) {@C#G[YOU RELEASED THE SCREEN TOO SOON]}{#T@C
#G[Screen released after]
$AV5=V120
%A[Y100]$SV5
%A[Y150]#G[milliseconds]
}
#W1500
@C%A[Y150]#G[Done. Re-touch the screen to exit.]#T
|
#J
&350