'urgent' messages for curses
Have curses catch up with tty. Some particular messages override message suppression after --More-ESC (tty) or >>ESC (curses).
This commit is contained in:
@@ -1299,6 +1299,8 @@ curses: implement selecting menu items via mouse
|
||||
curses: 'windowborders' can be set to 3 or 4 to suppress perm_invent borders
|
||||
to provide slightly more room for actual inventory info
|
||||
curses: if panictrace is triggered, reset the terminal before giving backtrace
|
||||
curses: if a message is marked urgent, override message suppression initiated
|
||||
by user having typed ESC at previous More>> prompt
|
||||
Qt: the "paper doll" inventory subset can be controlled via the "Qt Settings"
|
||||
dialog box ("Preferences..." on OSX)
|
||||
Qt: draw a border around each tile in the paper doll inventory; when BUC is
|
||||
|
||||
@@ -48,7 +48,7 @@ struct window_procs curses_procs = {
|
||||
#endif
|
||||
| WC2_FLUSH_STATUS | WC2_TERM_SIZE
|
||||
| WC2_STATUSLINES | WC2_WINDOWBORDERS | WC2_PETATTR | WC2_GUICOLOR
|
||||
| WC2_SUPPRESS_HIST | WC2_MENU_SHIFT),
|
||||
| WC2_SUPPRESS_HIST | WC2_URGENT_MESG | WC2_MENU_SHIFT),
|
||||
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */
|
||||
curses_init_nhwindows,
|
||||
curses_player_selection,
|
||||
@@ -498,6 +498,11 @@ curses_putstr(winid wid, int attr, const char *text)
|
||||
mesgflags = attr & (ATR_URGENT | ATR_NOHISTORY);
|
||||
attr &= ~mesgflags;
|
||||
|
||||
/* this is comparable to tty's cw->flags &= ~WIN_STOP; if messages are
|
||||
being suppressed after >>ESC, override that and resume showing them */
|
||||
if ((mesgflags & ATR_URGENT) != 0)
|
||||
curs_mesg_suppress_turn = -1L;
|
||||
|
||||
if (wid == WIN_MESSAGE && (mesgflags & ATR_NOHISTORY) != 0) {
|
||||
/* display message without saving it in recall history */
|
||||
curses_count_window(text);
|
||||
|
||||
@@ -20,7 +20,7 @@ extern char erase_char, kill_char;
|
||||
/* player can type ESC at More>> prompt to avoid seeing more messages
|
||||
for the current move; but hero might get more than one move per turn,
|
||||
so the input routines need to be able to cancel this */
|
||||
long curs_mesg_suppress_turn = -1;
|
||||
long curs_mesg_suppress_turn = -1L;
|
||||
|
||||
/* Message window routines for curses interface */
|
||||
|
||||
@@ -166,7 +166,7 @@ void
|
||||
curses_got_input(void)
|
||||
{
|
||||
/* if messages are being suppressed, reenable them */
|
||||
curs_mesg_suppress_turn = -1;
|
||||
curs_mesg_suppress_turn = -1L;
|
||||
|
||||
/* misleadingly named; represents number of lines delivered since
|
||||
player was sure to have had a chance to read them; if player
|
||||
|
||||
Reference in New Issue
Block a user