• Fix for frame.js

    From Digital Man@VERT to alterego on Sun Jul 26 19:29:29 2020
    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.

    digital man

    This Is Spinal Tap quote #6:
    David St. Hubbins: He was the patron saint of quality footwear.
    Norco, CA WX: 72.9øF, 67.0% humidity, 4 mph SE wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to alterego on Sun Jul 26 19:40:05 2020
    Re: Fix for frame.js
    By: Digital Man to alterego on Sun Jul 26 2020 07:29 pm

    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.

    Or maybe you meant to write: "when putmsg sees \1n".

    digital man

    This Is Spinal Tap quote #30:
    Big bottom, big bottom / Talk about mud flaps, my girl's got 'em!
    Norco, CA WX: 72.9øF, 67.0% humidity, 4 mph SE wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From alterego@VERT/ALTERANT to Digital Man on Mon Jul 27 12:55:57 2020
    Re: Fix for frame.js
    By: Digital Man to alterego on Sun Jul 26 2020 07:29 pm

    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.

    Well, I'm not sure.

    Without my patch, writing to a frame (I'm using frame.putmsg() not console.putmsg()), \n was not reseting the color - in fact the patch I gave you was just resetting the background color, but I see that I had to update it to reset the foreground color as well.

    ...ëîåï

    ... Modesty is a vastly overrated virtue.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
  • From alterego@VERT/ALTERANT to Digital Man on Mon Jul 27 13:13:02 2020
    Re: Fix for frame.js
    By: Digital Man to alterego on Sun Jul 26 2020 07:40 pm

    This patch changes the background back to black when putmsg sees \n.
    Or maybe you meant to write: "when putmsg sees \1n".

    Yes - I did mean that.

    The patch I gave you hasnt applied correctly - I probably should have given you a unified diff. <sorry>

    Can you revert it, and put this text in the "case 'N'" stanza:

    this.__properties__.curr_attr=((this.__properties__.curr_attr)&0x8f)|LIGHTGRAY;

    So that stanza not only reverts HIGH and BLINK, it also sets the background and foreground colors back to BG_BLACK|LIGHTGRAY.

    ...ëîåï

    ... I intend to live forever. So far, so good.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
  • From MRO@VERT/BBSESINF to alterego on Sun Aug 2 16:47:19 2020
    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
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From Nightfox@VERT/DIGDIST to MRO on Sun Aug 2 16:31:54 2020
    Re: Fix for frame.js
    By: MRO to alterego on Sun Aug 02 2020 04:47 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.

    Actually the 'n' attribute resets things back to dim white foreground on black background. The 'n' attribute stands for 'normal', which would mean to reset things back to normal. I've used \1n in a lot of my Synchronet mods and I've always seen it reset back to "normal" dim-white on black background.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to MRO on Sun Aug 2 20:28:02 2020
    Re: Fix for frame.js
    By: MRO to alterego on Sun Aug 02 2020 04:47 pm

    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

    That is incorrect. A Ctrl-AN reverts all attributes to "normal", lightgray on black, non-blinking.

    digital man

    Synchronet "Real Fact" #12:
    Synchronet was the first BBS software to ship with built-in RIPscrip support. Norco, CA WX: 71.1øF, 74.0% humidity, 6 mph ENE wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From MRO@VERT/BBSESINF to Digital Man on Wed Aug 5 22:44:21 2020
    Re: Fix for frame.js
    By: Digital Man to MRO on Sun Aug 02 2020 08:28 pm

    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.



    oh i've been doing \1n\1X for the color for a long time.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::