simplified menu_headings fix
Reported by entrez, some putstr() to text window got changed to add_menu_str(). I didn't test with curses; with tty some headers ended up in limbo: "Artifacts" header for '` a y' (wizard mode show artifacts, something I had forgotten even existed) and also monster class headers for 'm #vanquished by-class' (available to everyone). Qt lost them too, but at least it didn't panic. Not due to over-simplification: end of game disclosure suppresses header line highlighting, except when disclosing final inventory. Change it to do so, although it would be simpler overall to just not bother with any menu_headings highlight suppression.
This commit is contained in:
@@ -1079,9 +1079,15 @@ disclose(int how, boolean taken)
|
||||
ask = should_query_disclose_option('i', &defquery);
|
||||
c = ask ? yn_function(qbuf, ynqchars, defquery, TRUE) : defquery;
|
||||
if (c == 'y') {
|
||||
/* save and restore menu_headings in case something like
|
||||
#saveoptions is ever allowed to be run at the very end */
|
||||
int save_menu_headings = iflags.menu_headings;
|
||||
|
||||
/* caller has already ID'd everything; we pass 'want_reply=True'
|
||||
to force display_pickinv() to avoid using WIN_INVENT */
|
||||
iflags.menu_headings = ATR_NONE; /* don't highlight class hdrs */
|
||||
(void) display_inventory((char *) 0, TRUE);
|
||||
iflags.menu_headings = save_menu_headings;
|
||||
container_contents(gi.invent, TRUE, TRUE, FALSE);
|
||||
}
|
||||
if (c == 'q')
|
||||
|
||||
Reference in New Issue
Block a user