tty statuslines:3
Implement the 'statuslines' option for tty. 2 and 3 line status are similar to curses. Tty's version doesn't include insertion of extra spaces for enhanced readability, or ignoring 'showexp' when space is needed for other fields, or right justifying 'score' and suppressing it when there isn't room for the entire number. It continues to have abbreviated condition and encumbrance descriptions that curses lacks which get used when the normal ones take up too much space. 'statuslines' can be set with 'O' so it is feasible to switch back and forth between 2 and 3 lines on the fly. But only if the display is at least 25 lines (actually ROWNO+4) or else CLIPPING is enabled at build time. This fixes the bug where after resorting to abbreviated condition values it sometimes (always?) wouldn't switch back after more room became available. Abbreviated encumbrance values had problems too (lack of leading space and not changing value if encumbrance changed to anything other than unencumbered) and this fixes that as well.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 wintty.h $NHDT-Date: 1549327485 2019/02/05 00:44:45 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.32 $ */
|
||||
/* NetHack 3.6 wintty.h $NHDT-Date: 1553858470 2019/03/29 11:21:10 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.33 $ */
|
||||
/* Copyright (c) David Cohrs, 1991,1992 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -79,7 +79,7 @@ struct tty_status_fields {
|
||||
boolean valid;
|
||||
boolean dirty;
|
||||
boolean redraw;
|
||||
boolean last_on_row;
|
||||
boolean _not_used; /* was 'last_in_row' */
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -151,6 +151,7 @@ E void NDECL(cl_eos);
|
||||
* a color or whatever. wintty.c should concern itself with WHERE to put
|
||||
* stuff in a window.
|
||||
*/
|
||||
E int FDECL(term_attr_fixup, (int));
|
||||
E void FDECL(term_start_attr, (int attr));
|
||||
E void FDECL(term_end_attr, (int attr));
|
||||
E void NDECL(term_start_raw_bold);
|
||||
@@ -182,6 +183,7 @@ E void FDECL(win_tty_init, (int));
|
||||
|
||||
/* external declarations */
|
||||
E void FDECL(tty_init_nhwindows, (int *, char **));
|
||||
E void FDECL(tty_preference_update, (const char *));
|
||||
E void NDECL(tty_player_selection);
|
||||
E void NDECL(tty_askname);
|
||||
E void NDECL(tty_get_nh_event);
|
||||
|
||||
Reference in New Issue
Block a user