• exec/load/menubar.jssrc/sbbs3/atcodes.cpp js_console.cpp putmsg.cpp te

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sat Nov 14 16:47:04 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/5e6587db617ff41fe5ea957e
    Added Files:
    exec/load/menubar.js
    Modified Files:
    src/sbbs3/atcodes.cpp js_console.cpp putmsg.cpp terminal.cpp terminal.h Log Message:
    New lightbar @-codes for display files, with a JS library to drive them

    A display (menu) file can now mark its selectable items, so that a
    script can offer arrow-key navigation over art that was drawn with a
    lightbar in mind, without the item positions living in the script:

    @BAR:cmd@ ... @BAR@ everything displayed between the two codes, on
    one row, is an item with the command (key) 'cmd'
    @[text]cmd@ shorthand for a plain-text item; underscores in
    'text' are displayed as spaces
    @BARATTR:attr@ the attribute of the selected item (an attr.ini
    style string, e.g. B3E), or a bare @BARATTR@ to
    use the attribute in effect at that point

    The Terminal Server only records the items: their position, width,
    starting attribute and source text. They are cleared and scrolled with
    the mouse hot-spots (so clearing the screen forgets them) but, unlike hot-spots, are kept whether or not the terminal has a mouse. Each item
    is also registered as a strict mouse hot-spot for its command.

    JavaScript sees them as the read-only console.bars array (cmd, x, y,
    width, attr, text) and console.bar_attr. The new load/menubar.js
    (MenuBar) does the rest: it highlights the current item by redisplaying
    its text in the selected attribute (the item's own colours reversed
    when the file names none), moves to the nearest item in the direction
    of an arrow key, wrapping at the ends, and returns the item's command
    for Enter. Items that share a command are one item, which is how a
    multi-row button is made. With no items it passes every key through,
    so a script can use it unconditionally.

    A Terminal Server without this change displays the new codes as
    literal text.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net