LoginLogin
Might make SBS readonly: thread

Displaying Text on Touch Screen?

Root / FAQs / [.]

📌
FFVDGamesCreated:
Hey, I'm currently developing a secret project for SmileBASIC, and I don't know how to display text on the touch screen (I have never really tried to use BASIC before). Is there an easy way, or do I have to use ten lines of code to show one line of text?

To switch which screen you are using, use DISPLAY. To use the touch screen, use DISPLAY 1. For the top screen, use DISPLAY 0. Other than switching screens, it's the same as using the top screen.
LOCATE 5,5:?"HELLO!"
DISPLAY 1
LOCATE 9,9:?"I'M DOWN HERE!"
DISPLAY 0
LOCATE 0,0:?"BACK HERE!"

To switch which screen you are using, use DISPLAY. To use the touch screen, use DISPLAY 1. For the top screen, use DISPLAY 0. Other than switching screens, it's the same as using the top screen.
LOCATE 5,5:?"HELLO!"
DISPLAY 1
LOCATE 9,9:?"I'M DOWN HERE!"
DISPLAY 0
LOCATE 0,0:?"BACK HERE!"
Thanks! That really helps

Yep, Display 1 changes object display location.

Yep, Display 1 changes object display location.
It was much easier to do this on PTC. All you has to do was type in PNLSTR, put in coordinates, and type the text.

Yep, Display 1 changes object display location.
It was much easier to do this on PTC. All you has to do was type in PNLSTR, put in coordinates, and type the text.
Then try
DEF PNLSTR X,Y,TEXT$,C
   VAR OLD=DISPLAY()
   DISPLAY 1
   LOCATE X,Y
   COLOR C
   ?TEXT$
   DISPLAY OLD
END
Instant PNLSTR :P