Those aren't usually reasons why I choose text mode, but they are still achievable if instead of accepting the default page generated by an interface object, you create a page yourself at a location other than 0,0.
Run this code and you will see that you can touch the new page (colored pink) to get screen coordinates or use 2 fingers to quit.
A very cool feature. Start a 1 finger touch on the pink page then drag your finger anywhere on screen. You will still see the correct screen coordinates print!
But as soon as you release your touch the text page behaves like a text page, and you can interact with the text (eg. scroll, select, copy or paste).
There is one limitation on the new page that you define. It cannot be adjusted in size with the FRAME command. It is always screen-sized. But it can be relocated to either side, placed at top or bottom or moved to any corner to serve as a control area.
Code: Select all
/*
Touch in Text Mode 2
rbytes, February 2019
*/
get screen size sw,sh
Page "new" SET ! PAGE "new" show
page "new" color 1,.8,.8,1
page "new" at sw/2,sh/2
PRINT " The white area is a text page."
PRINT " The pink page is a control page."
PRINT
PRINT "1. Touch the control page and then drag anywhere with one finger."
PRINT " You will see the screen coordinates print on the text screen."
PRINT "2. Double tap any text on the text page."
PRINT " You can select, copy and paste the text."
PRINT "3. Print screen coordinates to overfill the screen."
PRINT " Then scroll the text page up and down."
PRINT "4. Touch the control page with two fingers to quit."
PRINT
DO SLOWDOWN
GET TOUCH 0 as x,y
GET TOUCH 1 as ox,oy
if x>-1 or y>-1 then
print x, y
endif
if ox>-1 then ! text clear ! end ! endif
UNTIL 0
The only thing that gets me down is gravity...