Qt player selection dialog

During role/race/gender/alignment selection, when gender gets toggled
replace the gender-specific role titles and their icons to reflect
new gender value.  And enable or disable Valkyrie choice depending
upon the gender value, not just current race value.

This ended up revising a lot of the NetHackQtPlayerSelector code,
eliminating some redundancies and being more careful with the use of
validrace()/validgend()/validalign().  That still isn't bulletproof.

It also changes the two instances of buttonPressed that were drawing
Qt6 warnings from connect() at run-time with buttonClicked.  That
works as intended with Qt5 and might eliminate those.

The code to use female player character tiles looks correct to me
but when I toggle gender, role titles change but their icons don't.
I don't know what's going on here.  Some ealier code always specifies
MALE but that code isn't used according to various prints to stderr
that I temporarily inserted.
This commit is contained in:
PatR
2022-01-10 13:23:09 -08:00
parent 560b74fabc
commit 1069777bc6
3 changed files with 151 additions and 71 deletions

View File

@@ -1123,6 +1123,8 @@ Qt: if player's run-time options specified a tiles file and it couldn't be
Qt: force the 'toptenwin' option On so that high scores display at end of game
is shown in a text window instead of being written to stdout where it
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: {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