OWBasic for Pocketviewer

Home INTRO Group TOUCHSCREEN Alphabetical Index

Test on Touch of a Defined Rectangle

TOUCHED!()
TOUCHED%()
TOUCHED!(x1%,y1%,x2%,y2%)
TOUCHED%(x1%,y1%,x2%,y2%)

The boolean function TOUCHED!() works similarly to NEWTOUCH!, but only for a contact in the rectangle with the upper left corner (x1, y1) and the lower right corner (x2, y2).

The use of the integer function TOUCHED() is no more recommended.

Example (should be use within a loop):


...
BOX 5,5,25,25,4
IF TOUCHED!(5,5,25,25) THEN 
  DRAWSTRING "Touched", 5, 55
ENDIF
...


Home INTRO Group TOUCHSCREEN Alphabetical Index