Qt: more ant extermination

After the fairly recent glyph changes, the icons shown for roles and
races during the character selection dialog all were all depicted by
the giant ant tile.  I might have noticed this sooner but usually
have '-@' on the command line to bypass selection.
This commit is contained in:
PatR
2022-01-04 11:54:05 -08:00
parent 07451ca32c
commit 9d34b727e2
2 changed files with 20 additions and 10 deletions
+2
View File
@@ -972,6 +972,8 @@ Qt: searching a text window for something that wasn't found and then searching
for some other target could crash for some other target could crash
Qt: changes in glyph handling in the core introduced a bug in the "paper doll" Qt: changes in glyph handling in the core introduced a bug in the "paper doll"
display for inventory subset display for inventory subset
Qt: during role selection, icons for role and race showed giant ant tile after
the glyph overhaul changes
tty: redraw unexplored locations as S_unexplored rather than <space> after tty: redraw unexplored locations as S_unexplored rather than <space> after
map has been partially overwritten by popup menu or text display map has been partially overwritten by popup menu or text display
tty: previous change resulted in remnants of previous level being shown on tty: previous change resulted in remnants of previous level being shown on
+11 -3
View File
@@ -270,9 +270,13 @@ NetHackQtPlayerSelector::NetHackQtPlayerSelector(NetHackQtKeyBuffer& ks UNUSED)
; ;
role->setRowCount(nrole); role->setRowCount(nrole);
for (i=0; roles[i].name.m; i++) { for (i=0; roles[i].name.m; i++) {
glyph_info gi;
int glyph = monnum_to_glyph(roles[i].malenum, fem);
map_glyphinfo(0, 0, glyph, 0, &gi);
QTableWidgetItem *item = new QTableWidgetItem( QTableWidgetItem *item = new QTableWidgetItem(
QIcon(qt_settings->glyphs().glyph(roles[i].malenum, fem)), QIcon(qt_settings->glyphs().glyph(glyph, gi.gm.tileidx, fem)),
roles[i].name.m); (fem && roles[i].name.f) ? roles[i].name.f : roles[i].name.m);
item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
role->setItem(i, 0, item); role->setItem(i, 0, item);
} }
@@ -286,8 +290,12 @@ NetHackQtPlayerSelector::NetHackQtPlayerSelector(NetHackQtKeyBuffer& ks UNUSED)
; ;
race->setRowCount(nrace); race->setRowCount(nrace);
for (i=0; races[i].noun; i++) { for (i=0; races[i].noun; i++) {
glyph_info gi;
int glyph = monnum_to_glyph(races[i].malenum, fem);
map_glyphinfo(0, 0, glyph, 0, &gi);
QTableWidgetItem *item = new QTableWidgetItem( QTableWidgetItem *item = new QTableWidgetItem(
QIcon(qt_settings->glyphs().glyph(races[i].malenum, fem)), QIcon(qt_settings->glyphs().glyph(glyph, gi.gm.tileidx, fem)),
races[i].noun); races[i].noun);
item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
race->setItem(i, 0, item); race->setItem(i, 0, item);