Qt extended command selection
Qt's implementation of '#' puts up a rectangular grid of buttons containing command names from the alphabetized extcmdlist[]: | # ? adjust annotate | apply attributes autopickup call | cast ... When 3.6 put all commands into that list, the hardcoded 4 columns resulted in so many rows that the grid wouldn't fit on the screen (at least not on my smallish laptop screen). There's no scrollbar so the commands beyond "takeoff" were inaccessible off the bottom. Warning messages from within Qt were issued to stderr complaining about trying to render something off the screen (once each time the '#' command grid was generated). It was also including wizard mode commands when not in wizard mode. Suppress those when they're not applicable, and change the grid to use 6 columns then and 8 for wizard mode. The appropriate amount ought to be calculated on the fly but these values work ok with the current command list. (On my screen; if something smaller is used, the original problem could come back, just not as severe as before.) Having an alphabetized list go across rows instead of down columns feels counter-intuitive so transpose the grid. | # autopickup ... | ? call | adjust cast | annotate ... | apply [Having another button next to <cancel> that lets the user switch back and forth between the two orientations could be worthwhile. A full-fledged wc/wc2 option for that doesn't seem warranted.] The commands can be selected by typing their names as an alternative to mouse click. The input widget supports <backspace> but lacked handling for <delete> so add that. When typing a command by its name, a new grid showing only matching candidates gets displayed so that you can switch back to mouse input. It looks pretty bad but does work as intended. I didn't touch that; however, it looks different now due to the columns-vs-rows change. The menu after picking "?" looks worse. It assumes a fixed width font and tries to align things in two columns with spaces, but the result when using a variable width font is ugly. This makes no attempt to address that.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.258 $ $NHDT-Date: 1595787211 2020/07/26 18:13:31 $
|
||||
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.260 $ $NHDT-Date: 1596039461 2020/07/29 16:17:41 $
|
||||
|
||||
General Fixes and Modified Features
|
||||
-----------------------------------
|
||||
@@ -322,6 +322,13 @@ curses: for vertical status, line up conditions in columns; usually two but
|
||||
msdos: add -DSTATUES_LOOK_LIKE_MONSTERS to Makefile1.cross so the VESA mode
|
||||
can display statue glyphs
|
||||
Qt: quit if can't load tiles file instead of continuing and then segfaulting
|
||||
Qt: use more columns for extended command selection dialog so that the number
|
||||
of rows needed doesn't result in some commands being unaccessible
|
||||
Qt: suppress wizard mode commands from '#' handling when not in wizard mode
|
||||
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 <delete>
|
||||
(aka <rubout>) in addition to <backspace> to go back a character
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user