Skip to content
Snippets Groups Projects
Commit aefb4d6f authored by deuce's avatar deuce
Browse files

Add the ansi_console.js file used by the last commit. :-)

parent f7a1e3e8
No related branches found
No related tags found
No related merge requests found
/*
* Handles ANSI, but does not provide the print method.
* Shared by jsut about everything except sbbs and local.
*/
dk.console.remote_io = {
clear:function() {
this.print("\x1b[2J\x1b[1;1H");
},
/*
* Clears to end of line.
* Not available witout ANSI (???)
*/
cleareol:function() {
if(dk.console.ansi)
this.print('\x1b[K');
},
/*
* Moves the cursor to the specified position.
* returns false on error.
* Not available without ANSI
*/
gotoxy:function(x,y) {
if(dk.console.ansi)
this.print(format("\x1b[%u;%uH", y+1, x+1));
},
};
var input_queue = load(true, "jsexec_input.js");
js.on_exit("input_queue.write(''); input_queue.poll(0x7fffffff);");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment