LoginLogin

What do you use to detect the touch screen being touched?

Root / Programming Questions / [.]

Epic_MankyCreated:
In PTC, you could use TCHST.
IF TCHST==1 THEN (Whatever you want here)
But since SmileBASIC removed everything I know, including TCHST, I don't know what to do. And by the way, I already know how to hide the keyboard. You just put
XSCREEN 2
.

TOUCH OUT TOUCHTIME, TOUCHX, TOUCHY
Returns the time the stylus has been held on the screen and the coordinate of the touch. Note that the range for coordinate output is X: 5-314, Y: 5-234. This is so you won't make something that requires you to touch X: 0, Y: 0 or something.
IF TOUCHTIME THEN
 (what would happen when you're holding the touch screen)
ENDIF 'You can have multiline IFs in SB! (just as a FYI.)

In PTC, you could use TCHST.
IF TCHST==1 THEN (Whatever you want here)
But since SmileBASIC removed everything I know, including TCHST, I don't know what to do. And by the way, I already know how to hide the keyboard. You just put
XSCREEN 2
.
In SmileBASIC for the 3DS, you have to make your own variables. If you want the same variables as in PTC, you can do: TOUCH OUT TCHST,TCHX,TCHY The you can do: IF TCHST==1 THEN ?"Clicked!"