Skip to content
Discussion options

You must be logged in to vote

Hi @zsdz

Yes. The screen in Circle understands the ANSI color codes. They are listed in doc/screen.txt. \x1b[44m sets the background to blue. \x1b[37m gives the light grey text that QBasic used.

The trick is to set the colors before you clear. Clearing and scrolling fill with the current background color. So this paints the whole screen blue.

const char *s = "\x1b[44m\x1b[37m\x1b[H\x1b[J";
mConsole.Write (s, strlen (s));

A few differences from a full terminal matter for kilo.

Each code has to be sent on its own. \x1b[44;37m is ignored because the m command only reads one number. Send \x1b[44m\x1b[37m instead.

\x1b[2J is ignored too. Use \x1b[H\x1b[J to clear the screen. Kilo's \x1b[K afte…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zsdz
Comment options

Answer selected by rsta2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants