Output cursor

classic Classic list List threaded Threaded
2 messages Options
tsm
Reply | Threaded
Open this post in threaded view
|

Output cursor

tsm
I am trying to figure out how to print the cursor.
What is the cursor meant to look like?
To print the cursor, do I use Screen.drawPixel()?
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Output cursor

cadet1620
Administrator
tsm wrote
I am trying to figure out how to print the cursor.
What is the cursor meant to look like?
To print the cursor, do I use Screen.drawPixel()?
Thanks
For Output.jack, the "cursor" is just the location where the next character will be displayed. It is not actually drawn on screen.

Output.moveCursor is documented as:
    /** Moves the cursor to the j-th column of the i-th row,
     *  and erases the character that was there. */

I use printChar(32) in my Output.jack to do this erase.  You could experiment with printing an underscore if you wanted to, but I suspect that it will leave lots of dribbles behind.

If you are talking about the cursor that is displayed during keyboard input, that is also a printed character.  The supplied Keyboard.vm uses character 0 (black square).  My Keyboard.jack uses underscore since I like that better.

--Mark