Qt extended commands enhancement

For Qt's pick-an-exetended-command dialog, allow a player to
toggle the grid layout from column-oriented to row-oriented
and vice versa and when in wizard mode to cycle the set of
shown (and typable) commands from 'all' to 'normal mode-only'
to 'wizard mode-only' back to 'all'.  The most recent values
are saved by Qt along with tile size, font size, and some other
stuff.  The extended command dialog has a Reset button to force
them (the two extended command values) back to their defaults.

The dialog layout has a slight change to conserve screen space
as well as three additional control buttons:
Was                                  Now
| [             Cancel            ]  | [Cancel] [Filter][Layout][Reset ]
|#                                   |#            Grid Title
|             Grid title             | [cmd 1] [cmd R+1] [cmd 2*R+1] ...
| [cmd 1] [cmd R+1] [cmd 2*R+1] ...  | [cmd 2] [cmd R+2]
| [cmd 2] [cmd R+2]                  |...
|...                                 | [cmd R] [cmd 2*R]
| [cmd R] [cmd 2*R]
'#' is the prompt where typed text gets echoed and 'R' is the
number of rows in the grid and varies by the set of commands
from the current filter.  Grid dimensions have been adjusted:
'all' is 13x9, 'normal' is 13x7, and 'wizard' is 7x4 or 4x7
depending on layout orientation.

The wizard mode-only filter setting probably isn't very useful
because you can only type--or click on--commands which are
visible.  So when set to wizard mode-only, you can't #quit for
instance.  (Via extended command; there are still menu choices
for that particular action.  And it's trivial to change filter.)
This commit is contained in:
PatR
2020-12-06 02:58:05 -08:00
parent 6bfd1c7e62
commit 197d8130d0
5 changed files with 466 additions and 80 deletions
+5
View File
@@ -24,9 +24,14 @@ public:
int dollWidth = 32, dollHeight = 32;
bool doll_is_shown = true;
#endif
bool xcmd_by_row = false;
int xcmd_set = 0; // all_cmds
// dialog box for Qt-specific settings
NetHackQtSettings();
void updateXcmd(bool by_row, int which_set);
NetHackQtGlyphs& glyphs();
const QFont& normalFont();
const QFont& normalFixedFont();