making con.color_pair to not use ANSI escape sequences which made fsh to run blazingly fast

This commit is contained in:
minjaesong
2022-05-08 20:43:25 +09:00
parent c05b973505
commit 979b11b1df
2 changed files with 14 additions and 3 deletions

View File

@@ -493,11 +493,14 @@ con.color_back = function(n) { // 0..7; -1 for transparent
print("\x1B["+(((n|0) % 8)+40)+"m");
};
con.color_pair = function(fore, back) { // 0..255
print("\x1B[38;5;"+fore+"m");
print("\x1B[48;5;"+back+"m");
// print("\x1B[38;5;"+fore+"m");
// print("\x1B[48;5;"+back+"m");
graphics.setTextFore(fore)
graphics.setTextBack(back)
};
con.clear = function() {
print("\x1B[2J");
// print("\x1B[2J");
graphics.clearText()
};
// @params arg 0 to hide, nonzero to show
con.curs_set = function(arg) {