Qt: force 'toptenwin' option On

'toptenwin' defaults to false, so the high scores list at end of game
gets written to stdout by default.  stdout might be a bit bucket if
the game is started from a menu somewhere or from Explorer or Finder
or something comparable.  Even when started from a terminal, writing
to stdout is bad if running asynchronously ('nethack &').

Have Qt init force the 'toptenwin' option to true to show the high
scores in a pop-up text window.  The "since you were in wizard mode
your score is ignored" line also goes to a pop-up text window now too.
An extra <return> is needed to dismiss that when quitting if you go
through the full disclosure sequence.

'nethack -s' writes scores to stdout before interface initialization
takes place, so isn't affected by this change.  That's intentional so
that 'nethack -s > ~/myscores' can be used to capture the output.
This commit is contained in:
PatR
2022-01-06 12:25:17 -08:00
parent a77e1602f1
commit 86343af200
2 changed files with 33 additions and 13 deletions

View File

@@ -1117,6 +1117,9 @@ Qt: while a text window was shown (such as the "things that are here" popup
Qt: if player's run-time options specified a tiles file and it couldn't be
loaded, Qt was falling back to x11tiles just like when the default
can't be loaded; fallback to player's file plus explicit path instead
Qt: force the 'toptenwin' option On so that high scores display at end of game
is shown in a text window instead of being written to stdout where it
might not be seen (note: doesn't apply to 'nethack -s')
Qt: {maybe just Qt+OSX:} when viewing a text window ('V' to look at 'history'
for instance), clicking on [Search], entering a search target in the
resulting popup and clicking on [Okay] or typing <return>, the text