GR adjusts text window. Fixes #33

GR now adjusts the text window to the bottom four lines of the
display. A unit test is added to verify.
This commit is contained in:
Joshua Bell 2020-05-29 20:57:57 -07:00
parent dca4875d3d
commit 44e308f030
2 changed files with 11 additions and 3 deletions

View File

@ -849,6 +849,13 @@ this.basic = (function() {
env.display.setState("lores", true, "full", false, "graphics", true);
env.lores.clear();
if (env.tty.textWindow) {
env.tty.textWindow.left = 0;
env.tty.textWindow.width = env.tty.getScreenSize().width;
env.tty.textWindow.top = env.tty.getScreenSize().height - 4;
env.tty.textWindow.height = 4;
}
env.tty.setCursorPosition(0, env.tty.getScreenSize().height);
},

View File

@ -402,9 +402,10 @@
7000 PRINT : PRINT "Lo-Res Graphics ";
7001 IF NOT LR THEN PRINT "<skipping GR tests>" : GOTO 8000
7010 REM ************************************************************
7010 REM Test GR as part of I/O (sets cursor to window bottom)
7010 REM ************************************************************
7010 T$ = "GR"
: U = PEEK(36) : V = PEEK(37)
: GR : S = (PEEK(37) = 23) : TEXT : POKE 36,U : POKE 37,V : GOSUB 1
: GR : S = (PEEK(34) = 20) : TEXT : POKE 36,U : POKE 37,V : GOSUB 1
7011 POKE 49232,0 : POKE 49234,0 : POKE 49238,0