CURSOR


cursor( x, y, [color] )
x the distance from the left side of the screen.
y the distance from the top side of the screen.
color (optional) a color number

This function will set the position of the cursor (used by the print function), for where to begin writing a string on the screen. The string will be written to the right of the (x,y) coordinates specified. Including the optional color argument will set the draw color, same as calling the color() function.


Examples:
cursor( 10, 20 )

- set the cursor to coordinates (10,20).


cursor( 30, 40, 5 )

- set the cursor to coordinates (30,40) and set the draw color to #5 (dark gray).


cursor( )

- reset the cursor to coordinates (0,0).



Important to know:

- When you call cls(), the cursor is reset to (0,0) but does not reset the draw color.

- When you call print(), with the x and y arguments specified, the cursor is set to those coordinates.

- The cursor is also adjusted after any call to print(), to be at the same X coordinate but the Y coordinate is shifted down 6 pixels to start the next line down. This allows the subsequent calls to print to begin at the same left-side margin, but on a new line.



544

10 Oct 2023

Font