\#overview fix
The revised #overview (displaying info in a menu instead of text
window), works as intended for tty and curses, during play and also
during end of game disclosure.
For X11 it worked during play but during disclosure it issued a
call to impossible() for every line of overview output and there
was no overview shown. ("add_menu: called before start_menu",
sent to stdout where the player may not have a chance to see it.)
For Qt things were worse, working during play but with indentation
that isn't what is intended, and during disclosure it crashed in
add_menu().
This avoids the impossible and the crash, by changing how the core
treats the menu rather than by updating how FOO_add_menu() deals
with the offending previous usage.
I suspect that to fix the Qt indentation, #overview might need to
be changed to behave like #attributes: use a menu during play but
a text window during disclosure. It has a hack for text windows
to switch from the default font to a fixed-width one if any line
in the text contains four consecutive spaces. Either menu windows
aren't doing the same thing, or the two-column layout they use to
render their text is messing that up. (I haven't looked.)
This commit is contained in:
@@ -3260,8 +3260,7 @@ show_overview(
|
||||
(void) recalc_mapseen();
|
||||
|
||||
win = create_nhwindow(NHW_MENU);
|
||||
if (why <= 0)
|
||||
start_menu(win, MENU_BEHAVE_STANDARD);
|
||||
start_menu(win, MENU_BEHAVE_STANDARD);
|
||||
/* show the endgame levels before the rest of the dungeon,
|
||||
so that the Planes (dnum 5-ish) come out above main dungeon (dnum 0) */
|
||||
if (In_endgame(&u.uz))
|
||||
|
||||
Reference in New Issue
Block a user