• ANSI boxes

    From deon@21:2/116.1 to All on Mon Dec 17 23:34:20 2018
    So I have a question that hopefully somebody can help me with.

    I am rendering an ANSI page - I then want to render a "popup box" on the page
    - a little similar to what occurs when you press ESC in mystic and the
    "Editor Commands" popup appears.

    When I close the "popup box" I need to restore what was originally behind it (if there was something).

    Is there an ANSI way of doing this (ie: CSI control codes), or do I need to repaint what I overwrote (and therefore I need to know what I'll overwrite before placing the popup box)? If the later, is there an ANSI CSI way of knowing what is on the screen already before overwriting it?

    ...deon

    _--_|\ | Deon George
    / \ | Chinwag BBS - A BBS on a PI in Docker!
    \_.__.*/ |
    V | Coming from the 'burbs of Melbourne, Australia

    --- Mystic BBS v1.12 A39 2018/04/21 (Raspberry Pi/32)
    * Origin: Chinwag | MysticBBS in Docker on a Pi! (21:2/116.1)
  • From echicken@21:1/164 to deon on Mon Dec 17 19:16:34 2018
    Re: ANSI boxes
    By: deon to All on Mon Dec 17 2018 23:34:20

    When I close the "popup box" I need to restore what was originally behind it (if there was something).

    Is there an ANSI way of doing this (ie: CSI control codes), or do I need to repaint what I overwrote (and therefore I need to know what I'll overwrite before placing the popup box)? If the later, is there an ANSI CSI way of knowing what is on the screen already before overwriting it?

    In Synchronet-land we have a display management library we can use in our scripts for exactly this purpose (frame.js). It keeps track of the contents of the user's terminal, server-side, can layer things on top of one another, and delete/redraw things as needed. This involves re-sending the same stuff to the client when it needs to be redisplayed, which isn't efficient but can be kept to a minimum.

    Your BBS' config utilities probably use some textmode UI library that offers these features. The same could probably be used in a "door", or exposed by the BBS to its scripting environment. Failing that, you'd basically need to create your own display-management thing.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-425-5435
    * Origin: electronic chicken bbs - bbs.electronicchicken.com (21:1/164)
  • From garycrunk@21:4/126 to deon on Mon Dec 17 18:08:56 2018
    I am rendering an ANSI page - I then want to render a "popup box" on the page - a little similar to what occurs when you press ESC in mystic and the "Editor Commands" popup appears.
    Is there an ANSI way of doing this (ie: CSI control codes), or do I need to repaint what I overwrote (and therefore I need to know what I'll overwrite before placing the popup box)? If the later, is there an ANSI CSI way of knowing what is on the screen already before overwriting it?

    Deon;
    I am writing a door game, and I have Pop-Up Menu's. When the menu is closed, I simply have the program Re-draw the screen behind the popup.

    ---=[ Gary Crunk ]=---
    Another F-ing BBS : anotherbbs.ddns.net Port 23
    Quazar BBS Door Game Server: quazarbbs.ddns.net Port 2323

    --- Mystic BBS v1.12 A39 2018/04/21 (Windows/64)
    * Origin: Another F-ing BBS (21:4/126)
  • From deon@21:2/116.1 to echicken on Tue Dec 18 02:13:46 2018
    On 12/17/18, echicken said the following...
    Failing that, you'd
    basically need to create your own display-management thing.

    I thought I would need to :( I was hoping of getting out of doing that.

    Thanks for the heads up.

    ...deon

    _--_|\ | Deon George
    / \ | Chinwag BBS - A BBS on a PI in Docker!
    \_.__.*/ |
    V | Coming from the 'burbs of Melbourne, Australia

    --- Mystic BBS v1.12 A39 2018/04/21 (Raspberry Pi/32)
    * Origin: Chinwag | MysticBBS in Docker on a Pi! (21:2/116.1)
  • From deon@21:2/116.1 to garycrunk on Tue Dec 18 02:41:26 2018
    On 12/17/18, garycrunk said the following...
    I am writing a door game, and I have Pop-Up Menu's. When the menu is closed, I simply have the program Re-draw the screen behind the popup.

    In my case that wont work - as I'm presenting an ANSI screen that takes input from the user. I was wanting to implement select list "popup boxes" as part
    of that input - which means I need to keep track of what is on the screen.

    Not too much of an issue in my case, because every keystroke is echo'ed
    server side, so I just need to keep track of where the cursor is and what is placed where. (I was hoping that I could leverage the client to help me to an extent - seems I cant ...)

    Thanks for the tip though...

    ...deon

    _--_|\ | Deon George
    / \ | Chinwag BBS - A BBS on a PI in Docker!
    \_.__.*/ |
    V | Coming from the 'burbs of Melbourne, Australia

    --- Mystic BBS v1.12 A39 2018/04/21 (Raspberry Pi/32)
    * Origin: Chinwag | MysticBBS in Docker on a Pi! (21:2/116.1)
  • From echicken@21:1/164 to deon on Mon Dec 17 22:43:08 2018
    Re: Re: ANSI boxes
    By: deon to garycrunk on Tue Dec 18 2018 02:41:26

    is placed where. (I was hoping that I could leverage the client to help me to an extent - seems I cant ...)

    I meant to say, it'd be great if the terminal did offer you some way of doing this, but as far as I know, it doesn't.

    It's not a crazy difficult thing to implement server-side, depending on how far you want to go with the features.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-425-5435
    * Origin: electronic chicken bbs - bbs.electronicchicken.com (21:1/164)
  • From Gryphon@21:1/120 to deon on Tue Dec 18 10:32:36 2018
    On 12/17/18, deon said the following...

    So I have a question that hopefully somebody can help me with.

    I am rendering an ANSI page - I then want to render a "popup box" on the page - a little similar to what occurs when you press ESC in mystic and the "Editor Commands" popup appears.

    When I close the "popup box" I need to restore what was originally
    behind it (if there was something).

    Is there an ANSI way of doing this (ie: CSI control codes), or do I need to repaint what I overwrote (and therefore I need to know what I'll overwrite before placing the popup box)? If the later, is there an ANSI CSI way of knowing what is on the screen already before overwriting it?

    Mystic has two relevant MCI codes for this. <pipe>SS and <pipe>RS. SS will save the contents of the terminal screen, and RS will restor the contents of the terminal screen.

    Open your ANSI in a TEXT editor, and the <pipe>SS to the very beginning of
    all text. Then go to the very end of all text and add <pipe>RS.

    This should have the effect of restoring the terminal to the state it was in before the ansi was displayed.

    --- Mystic BBS v1.12 A39 2018/04/21 (Linux/64)
    * Origin: Cyberia BBS | cyberiabbs.zapto.org | San Jose, CA (21:1/120)
  • From deon@21:2/116.1 to Gryphon on Tue Dec 18 20:50:50 2018
    On 12/18/18, Gryphon said the following...
    Mystic has two relevant MCI codes for this. <pipe>SS and <pipe>RS. SS will save the contents of the terminal screen, and RS will restor the contents of the terminal screen.

    I assume this is implemented server side, ie: it is the server knowing to repaint the screen, not instructions sent to the client to "remember" and
    then "paste"?

    (I think clients are not that smart, and I cant find anything in the SPECs
    I'm digging through - but wanted to verify...).

    ...deon

    _--_|\ | Deon George
    / \ | Chinwag BBS - A BBS on a PI in Docker!
    \_.__.*/ |
    V | Coming from the 'burbs of Melbourne, Australia

    --- Mystic BBS v1.12 A39 2018/04/21 (Raspberry Pi/32)
    * Origin: Chinwag | MysticBBS in Docker on a Pi! (21:2/116.1)
  • From g00r00@21:1/112 to deon on Tue Dec 18 21:24:04 2018
    I am rendering an ANSI page - I then want to render a "popup box" on the page - a little similar to what occurs when you press ESC in mystic and the "Editor Commands" popup appears.

    When I close the "popup box" I need to restore what was originally
    behind it (if there was something).

    Are you using Mystic? If so, Mystic will already do it for you if you are using the command to do a pop up box. But if you aren't there are MCI codes you can use to save and restore the screen and Mystic will calculate what has changed and redraw it.

    But I've never seen any other system that can do that sort of stuff on the
    BBS side.

    --- Mystic BBS v1.12 A39 2018/04/21 (Windows/32)
    * Origin: Black Flag <ACiD Telnet HQ> blackflagbbs.com (21:1/112)
  • From deon@21:2/116.1 to g00r00 on Wed Dec 19 03:10:42 2018
    On 12/18/18, g00r00 said the following...
    Are you using Mystic?

    No, I'm using something else that I've built.

    I actually have everything I need to "know" what I send to the client - I was looking for an easy way out... or didnt want to re-invent the wheel if the
    ANSI ctrl codes allowed for that functionality. :D

    ...deon

    _--_|\ | Deon George
    / \ | Chinwag BBS - A BBS on a PI in Docker!
    \_.__.*/ |
    V | Coming from the 'burbs of Melbourne, Australia

    --- Mystic BBS v1.12 A39 2018/04/21 (Raspberry Pi/32)
    * Origin: Chinwag | MysticBBS in Docker on a Pi! (21:2/116.1)
  • From Gryphon@21:1/120 to deon on Thu Dec 20 11:47:42 2018
    On 12/18/18, deon said the following...

    On 12/18/18, Gryphon said the following...
    Mystic has two relevant MCI codes for this. <pipe>SS and <pipe>RS. will save the contents of the terminal screen, and RS will restor the contents of the terminal screen.

    I assume this is implemented server side, ie: it is the server knowing to repaint the screen, not instructions sent to the client to "remember" and then "paste"?

    It appears to be a server-side implementation because it works for all the major ansi telnet clients; i.e. syncterm and netrunner.

    --- Mystic BBS v1.12 A39 2018/04/21 (Linux/64)
    * Origin: Cyberia BBS | cyberiabbs.zapto.org | San Jose, CA (21:1/120)