behaviour of con.addch changed - no longer advances cursor

This commit is contained in:
minjaesong
2021-01-29 14:19:37 +09:00
parent c73a725466
commit d963cf8294
10 changed files with 36 additions and 19 deletions

View File

@@ -394,6 +394,22 @@ con.getmaxyx = function() {
con.getyx = function() {
return graphics.getCursorYX();
};
con.curs_up = function() {
let c = graphics.getCursorYX();
con.move(c[0]-1,c[1]);
};
con.curs_down = function() {
let c = graphics.getCursorYX();
con.move(c[0]+1,c[1]);
};
con.curs_left = function() {
let c = graphics.getCursorYX();
con.move(c[0],c[1]-1);
};
con.curs_right = function() {
let c = graphics.getCursorYX();
con.move(c[0],c[1]+1);
};
con.hitterminate = function() { // ^C
sys.poke(-40, 1);
return (sys.peek(-41) == 31 && (sys.peek(-42) == 129 || sys.peek(-42) == 130));