Add files via upload
This commit is contained in:
parent
64c6352265
commit
35131ba393
90 changed files with 1738 additions and 0 deletions
31
Examples/TouchScreen/touchup.bas
Normal file
31
Examples/TouchScreen/touchup.bas
Normal file
|
@ -0,0 +1,31 @@
|
|||
SUB MAIN
|
||||
DIM XY, XPOS, YPOS AS INTEGER
|
||||
DIM LASTX, LASTY AS INTEGER
|
||||
DIM MSG AS STRING
|
||||
|
||||
LASTX = 0
|
||||
LASTY = 0
|
||||
MSG = "Touch the Screen (Up)"
|
||||
|
||||
GRAPHICS
|
||||
SETCOLOR 0,0,0
|
||||
CLS
|
||||
SETCOLOR 255,255,255
|
||||
DRAWSTRING MSG,(SCREENWIDTH()-STRINGWIDTH(MSG))/2, SCREENHEIGHT()/2
|
||||
REPAINT
|
||||
|
||||
WHILE TRUE
|
||||
XY = TOUCHUP()
|
||||
IF (XY <> -1) THEN
|
||||
XPOS = (XY / 65536) & 0x0000ffff
|
||||
YPOS = XY & 0x0000ffff
|
||||
SETCOLOR RND(256),RND(256),RND(256)
|
||||
DRAWLINE LASTX,LASTY,XPOS,YPOS
|
||||
LASTX = XPOS
|
||||
LASTY = YPOS
|
||||
REPAINT
|
||||
ELSE
|
||||
SLEEP 10
|
||||
END IF
|
||||
END WHILE
|
||||
END SUB
|
Loading…
Add table
Add a link
Reference in a new issue