Hey DM,
I have a fix for frame.js - I noticed an issue that \1n was not reseting back to normal (normal being black background).
Eg: I had this:
const frame = new Frame(1,1,console.screen_columns,console.screen_rows,BG_BLACK|LIGHTGRAY); frame.gotoxy(1,1);
frame.putmsg(test);
and if test was sending something like \1n\17\1kfoo\1nbar, "bar" would still have a white background with black text.
This patch changes the background back to black when putmsg sees \n.
Re: Fix for frame.js
By: alterego to Digital Man on Sat Jul 25 2020 11:39 pm
Hey DM,
I have a fix for frame.js - I noticed an issue that \1n was not reseting back to normal (normal being black background).
Eg: I had this:
const frame = new Frame(1,1,console.screen_columns,console.screen_rows,BG_BLACK|LIGHTGRAY); frame.gotoxy(1,1);
frame.putmsg(test);
and if test was sending something like \1n\17\1kfoo\1nbar, "bar" would still have a white background with black text.
This patch changes the background back to black when putmsg sees \n.
But putmsg() should return the current attribute even on the next line, no? That's how console.putmsg() works.
const frame = new
Frame(1,1,console.screen_columns,console.screen_rows,BG_BLACK|LIGHTGRA
Y); frame.gotoxy(1,1);
frame.putmsg(test);
and if test was sending something like \1n\17\1kfoo\1nbar, "bar" would
still have a white background with black text.
But putmsg() should return the current attribute even on the next line, no? That's how console.putmsg() works.
Or maybe you meant to write: "when putmsg sees \1n".This patch changes the background back to black when putmsg sees \n.
So am I right - \1n should reset the colors to black background and white foreground?
So am I right - \1n should reset the colors to black background and
white foreground?
no. that just makes it a 'dark' version of the current fg color.
Re: Fix for frame.js
By: alterego to Digital Man on Sun Aug 02 2020 05:28 pm
So am I right - \1n should reset the colors to black background and white foreground?
no. that just makes it a 'dark' version of the current fg color.
it might change the bg to black though.
\1h\1w is bright white
\1r\1n is dark red
it might change the bg to black though.
\1h\1w is bright white
\1r\1n is dark red
That is incorrect. A Ctrl-AN reverts all attributes to "normal", lightgray on black, non-blinking.
Sysop: | Coz |
---|---|
Location: | Anoka, MN |
Users: | 2 |
Nodes: | 4 (0 / 4) |
Uptime: | 158:43:58 |
Calls: | 162 |
Files: | 5,334 |
Messages: | 221,585 |