mirror of
https://github.com/inexorabletash/jsbasic.git
synced 2025-01-17 08:29:50 +00:00
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:
parent
dca4875d3d
commit
44e308f030
7
basic.js
7
basic.js
@ -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);
|
||||
},
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user