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:
@@ -24,6 +24,9 @@ public slots:
|
||||
void Randomize();
|
||||
void plnamePlayVsQuit();
|
||||
|
||||
void populate_roles();
|
||||
void populate_races();
|
||||
|
||||
void selectName(const QString& n);
|
||||
void selectRole(int current, int, int previous, int);
|
||||
void selectRace(int current, int, int previous, int);
|
||||
@@ -43,6 +46,8 @@ private:
|
||||
bool fully_specified_role;
|
||||
int chosen_gend;
|
||||
int chosen_align;
|
||||
int cleric_role_row;
|
||||
int human_race_row;
|
||||
|
||||
QPushButton *rand_btn;
|
||||
QPushButton *play_btn;
|
||||
|
||||
Reference in New Issue
Block a user