mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-09 22:54:03 +09:00
behaviour of con.addch changed - no longer advances cursor
This commit is contained in:
@@ -2,6 +2,6 @@ con.clear();
|
||||
con.move(1,1);
|
||||
for (let i = 0; i < 1024; i++) {
|
||||
if (i < 512) con.color_pair(239, 0); else con.color_pair(0, 239);
|
||||
con.addch(i%256);
|
||||
con.addch(i%256);con.curs_right();
|
||||
}
|
||||
println();
|
||||
@@ -236,11 +236,11 @@ const greetRightPad = termWidth - greetLeftPad - greetText.length - 6;
|
||||
|
||||
con.clear();
|
||||
con.color_pair(253,255);
|
||||
print(' ');con.addch(17);
|
||||
print(' ');con.addch(17);con.curs_right();
|
||||
con.color_pair(0,253);
|
||||
print(" ".repeat(greetLeftPad)+greetText+" ".repeat(greetRightPad));
|
||||
con.color_pair(253,255);
|
||||
con.addch(16);
|
||||
con.addch(16);con.curs_right();print(' ');
|
||||
con.move(3,1);
|
||||
|
||||
con.color_pair(239,255);
|
||||
@@ -1117,9 +1117,10 @@ if no arg text were given (e.g. "10 NEXT"), args will have zero length
|
||||
let printstr = "";
|
||||
if (rsvArg === undefined)
|
||||
print("")
|
||||
else if (!isNaN(rsvArg)) {
|
||||
else if (isNumable(rsvArg)) {
|
||||
let c = con.getyx();
|
||||
con.addch(rsvArg);
|
||||
con.addch(tonum(rsvArg));
|
||||
con.move(c[0],c[1]+1);
|
||||
}
|
||||
else if (rsvArg.toString !== undefined)
|
||||
print(rsvArg.toString());
|
||||
|
||||
@@ -21,7 +21,7 @@ function print_prompt_text() {
|
||||
con.color_pair(239,161);
|
||||
print(" "+CURRENT_DRIVE+":");
|
||||
con.color_pair(161,253);
|
||||
con.addch(16);
|
||||
con.addch(16);con.curs_right();
|
||||
con.color_pair(0,253);
|
||||
print(" \\"+shell_pwd.join("\\").substring(1)+" ");
|
||||
if (errorlevel != 0) {
|
||||
@@ -29,8 +29,8 @@ function print_prompt_text() {
|
||||
print("["+errorlevel+"] ");
|
||||
}
|
||||
con.color_pair(253,255);
|
||||
con.addch(16);
|
||||
con.addch(32);
|
||||
con.addch(16);con.curs_right();
|
||||
con.addch(32);con.curs_right();
|
||||
con.color_pair(239,255);
|
||||
}
|
||||
else {
|
||||
@@ -46,11 +46,11 @@ function greet() {
|
||||
con.color_pair(239,255);
|
||||
con.clear();
|
||||
con.color_pair(253,255);
|
||||
print(' ');con.addch(17);
|
||||
print(' ');con.addch(17);con.curs_right();
|
||||
con.color_pair(0,253);
|
||||
print(" ".repeat(greetLeftPad)+welcome_text+" ".repeat(greetRightPad));
|
||||
con.color_pair(253,255);
|
||||
con.addch(16);print(' ');
|
||||
con.addch(16);con.curs_right();print(' ');
|
||||
con.move(3,1);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -9,12 +9,12 @@ function print_prompt_text() {
|
||||
con.color_pair(239,161);
|
||||
print(" "+CURRENT_DRIVE+":");
|
||||
con.color_pair(161,253);
|
||||
con.addch(16);
|
||||
con.addch(16);con.curs_right();
|
||||
con.color_pair(0,253);
|
||||
print(" \\"+shell_pwd.join("\\")+" ");
|
||||
con.color_pair(253,255);
|
||||
con.addch(16);
|
||||
con.addch(32);
|
||||
con.addch(16);con.curs_right();
|
||||
con.addch(32);con.curs_right();
|
||||
con.color_pair(239,255);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ let repaint = function() {
|
||||
if (cx >= 0 && cx < termW) {
|
||||
con.move(cy, cx);
|
||||
if (char != 10 && char != 13)
|
||||
con.addch(char);
|
||||
con.addch(char);con.curs_right();
|
||||
}
|
||||
cx += 1;
|
||||
}
|
||||
|
||||
@@ -26,11 +26,12 @@ class SimpleScreen {
|
||||
|
||||
con.move(1,1);
|
||||
con.color_pair(253,255);
|
||||
print(' ');con.addch(17);
|
||||
print(' ');con.addch(17);con.curs_right();
|
||||
con.color_pair(0,253);
|
||||
print(" ".repeat(titleLeftPad)+this.title+" ".repeat(titleRightPad));
|
||||
con.color_pair(253,255);
|
||||
con.addch(16);print(' ');
|
||||
con.addch(16);con.curs_right();print(' ');
|
||||
con.move(3,1);
|
||||
}
|
||||
redraw() {
|
||||
con.color_pair(239,255);
|
||||
|
||||
Reference in New Issue
Block a user