-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $ $NHDT-Date: 1643491497 2022/01/29 21:24:57 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.782 $ $NHDT-Date: 1644545143 2022/02/11 02:05:43 $
General Fixes and Modified Features
-----------------------------------
might not be seen (note: doesn't apply to 'nethack -s')
Qt: during role/race/&c selection, update role titles with their icons, and
also Valk eligibility, when gender is toggled
+Qt: if a menu of objects contains at least one iron ball, and player is not
+ alreadly in the midst of entering a count, recognize '0' as a group
+ accelerator rather than the start of a count
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
QFontMetrics fm(table->font());
QString col0width_str = "";
if (biggestcount > 0L)
- col0width_str = QString::asprintf("%*ld", std::max(countdigits, 1), biggestcount);
+ col0width_str = QString::asprintf("%*ld", std::max(countdigits, 1),
+ biggestcount);
int col0width_int = (int) fm.QFM_WIDTH(col0width_str) + MENU_WIDTH_SLOP;
if (col0width_int > table->columnWidth(0))
WidenColumn(0, col0width_int);
} else {
biggestcount = std::max(biggestcount, newcount);
QString num;
- num = QString::asprintf("%*ld", std::max(countdigits, 1), biggestcount);
+ num = QString::asprintf("%*ld", std::max(countdigits, 1),
+ biggestcount);
int numlen = (int) num.length();
if (numlen % 2)
++numlen;
reject();
} else if (key == '\r' || key == '\n' || key == ' ') {
accept();
+ } else if ('0' <= key && key <= '9' && !counting) {
+ // check whether digit 'key' matches a group accelerator
+ int hits = 0;
+ for (int row = 0; row < itemcount; ++row)
+ if (key == (uchar) itemlist[row].gch) {
+ ToggleSelect(row, false); // matched so toggle this item
+ ++hits;
+ }
+ if (!hits) // didn't match any group accelerator; start a count
+ InputCount(key);
} else if (('0' <= key && key <= '9')
|| (key == '#' && !counting)
|| key == '\b' || key == '\177') {