https://gitlab.synchro.net/main/sbbs/-/commit/b7f3bfecf3b6f12ec47970fb
Modified Files:
ctrl/attr.ini text.dat docs/v322_new.md exec/load/sbbsdefs.js text.js src/sbbs3/getkey.cpp load_cfg.c sbbs.h sbbsdefs.h terminal.cpp terminal.h text.h text_defaults.c text_id.c
Log Message:
Terminal Server: mnemonic prompts are lightbars
On a terminal that supports color and cursor positioning, the command
words of a mnemonics() prompt can be selected with the Left and Right
arrow keys (wrapping at the ends), and Enter acts as though the selected
word's command key were typed. Typing a command key works as before, and
a terminal without those capabilities sees no change.
A one-word "[bracketed]" word with at most one command key ("[Next]", "[~Cancel]") names what Enter does: it is highlighted first, Enter on it
is a plain Enter, and a mouse click on it sends Enter. Up/Down or any
other key returns the highlight to it. The delimiters come from the new MnemonicDefaultDelimiters text.dat string ("[]"; blank for none, so a
language can use its own).
getkeys() handles the arrows itself when its accepted keys don't
include them, offering only the words whose keys it accepts. A script
or module calling getkey() opts in with the new K_LIGHTBAR mode flag
(also in sbbsdefs.js), since many callers use Left and Right for other
things.
The selected word is drawn in the new "mnebar" attr.ini color, or when
that is blank (the default) in the word's own colors, reversed. scfg_t
gains that color, so sbbsctrl.exe needs a rebuild.
mnemonics() also no longer reads past the end of a string that ends in
a lone '~'.
Co-Authored-By: Claude Opus 5.5 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net