• Possible Addition to Mystic

    From Black Panther@1:317/3 to G00r00 on Fri Nov 19 18:14:08 2021
    Hi g00r00,

    I've been working on updating Castle Rock, to utilize both 132x37 and 160x45 modes. One thing that I have on here is text boxes which are used as the mnewscan and fnewscan menus.

    My question, is there a way to use the 'V'-type text box, and indicate to center the box on the screen, depending on the terminal size?

    For example, for 80x25, I have the following set up as a the prompt: <pipe>#V#2#25#8# Scan for new messages? #A-All...etc

    If there was a way that we could put in, say, <pipe>#V#2#X/2#8...etc, where X was the max x, or TermSizeX (using mpl terms), divided by 2 to find the center of the screen, it would make things a bit easier. This is something that can be done pretty easily with MPL, but this might be something that could help out other sysops.

    I know you've been busy, and really want to get a47 finished, so don't worry about it right now. This is something that can wait until a48. ;)

    Thank you for your hard work on Mystic, and also for considering this.


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    ... Don't sweat the petty things and don't pet the sweaty things

    --- Mystic BBS v1.12 A47 2021/09/07 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com (1:317/3)
  • From g00r00@1:129/215 to Black Panther on Mon Nov 22 13:30:09 2021
    If there was a way that we could put in, say, <pipe>#V#2#X/2#8...etc, where X was the max x, or TermSizeX (using mpl terms), divided by 2 to find the center of the screen, it would make things a bit easier. This
    is something that can be done pretty easily with MPL, but this might be something that could help out other sysops.

    I have given some thought and put some time into some ideas around this and I am very open to suggestions. Here's what I have worked on/thought about:

    One thing I experimented with was some inline scripting that I called "QuickScript" where you can get access to some basic values/math functions right inside an MCI code in places where an X/Y value would be involved.

    I have a basic scripting engine that actually works now just not enabled in Mystic and it looks like this:

    {(80+(wx/2))-2}

    And that would allow you to calculate numbers right in an MCI code. In that example "WY" and "WX" are the user's terminal size X/Y. I was expanding it to support other variables and stuff but I stopped at some point.

    Like you mentioned the same could be accomplished today using MPL or also an external display file like "mybox.c132.ans" that shows the box where you want it only for 132+ displays and so on.

    Another idea specifically for the box drawing code would be to have the option for it to automatically center on the screen if you supply a "0" value for
    the start or end X positions. This might be a good thing to add too.

    ... Do device drivers need a chauffeur's license?

    --- Mystic BBS v1.12 A47 2021/11/18 (Windows/64)
    * Origin: Sector 7 * Mystic WHQ (1:129/215)
  • From Black Panther@1:317/3 to g00r00 on Mon Nov 22 13:06:16 2021
    On 22 Nov 2021, 01:30p, g00r00 said the following...

    One thing I experimented with was some inline scripting that I called "QuickScript" where you can get access to some basic values/math
    functions right inside an MCI code in places where an X/Y value would be involved.

    That sounds like a great idea. Would that be something that could also be used in Mystic prompts? That is another area that I'm messing around with. :)

    {(80+(wx/2))-2}

    And that would allow you to calculate numbers right in an MCI code. In that example "WY" and "WX" are the user's terminal size X/Y. I was expanding it to support other variables and stuff but I stopped at some point.

    Looks easy enough to work with. Like I said, there is no rush on this one. Just throwing ideas out there.

    Like you mentioned the same could be accomplished today using MPL or
    also an external display file like "mybox.c132.ans" that shows the box where you want it only for 132+ displays and so on.

    I actually wrote a 1-line MPL that will cover any terminal size. ;)

    Another idea specifically for the box drawing code would be to have the option for it to automatically center on the screen if you supply a "0" value for the start or end X positions. This might be a good thing to
    add too.

    This might be handy for the text boxes. I do also like the scripting mentioned above, as it would open a lot more doors for mods.

    Thank you for considering the idea. :)


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    ... A Skydiver is taken by the gravity of his situation.

    --- Mystic BBS v1.12 A47 2021/09/07 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com (1:317/3)