From 8ca0834eb2cd23e7d5902dbcdf49ca9e2ca7f2d4 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 30 Jul 2020 08:58:57 -0700 Subject: [PATCH] Qt pick-none menu vs [cancel] Qt menus have [ok][cancel][all][none][other stuff] buttons across the top but it was disabling [cancel] for inventory viewing and other pick-none menus. Enable that so that [cancel] is a viable alternative to typing ESC or clicking on [ok] for dismissing the menu without picking anything. --- doc/fixes37.0 | 5 ++++- win/Qt/qt_menu.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index ec4a8f2b8..cc9312a41 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.260 $ $NHDT-Date: 1596039461 2020/07/29 16:17:41 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.261 $ $NHDT-Date: 1596124734 2020/07/30 15:58:54 $ General Fixes and Modified Features ----------------------------------- @@ -329,6 +329,9 @@ Qt: organize extended command selection grid by columns instead of by rows (first N entries down left column, next N entries down 2nd column, &c) Qt: when selecting an extended command by typing its name, support (aka ) in addition to to go back a character +Qt: switch to fixed-width font for menus +Qt: don't disable [cancel] button when viewing inventory or other pick-none + menus; ESC works to dismiss those and [cancel] should be the same tiles: add indicator of thonged portion to aklys tile tty: role and race selection menus weren't filtering out potential choices which got excluded by OPTIONS=align:!lawful or !neutral or !chaotic diff --git a/win/Qt/qt_menu.cpp b/win/Qt/qt_menu.cpp index 405a982b8..2f4d41762 100644 --- a/win/Qt/qt_menu.cpp +++ b/win/Qt/qt_menu.cpp @@ -222,7 +222,7 @@ int NetHackQtMenuWindow::SelectMenu(int h, MENU_ITEM_P **menu_list) how=h; ok->setEnabled(how!=PICK_ONE);ok->setDefault(how!=PICK_ONE); - cancel->setEnabled(how!=PICK_NONE); + cancel->setEnabled(true); all->setEnabled(how==PICK_ANY); none->setEnabled(how==PICK_ANY); invert->setEnabled(how==PICK_ANY);