Qt: character selection

For Qt's character selection widget, only allow the [Play] button
to be used when the character name field is non-blank.  When that
field is blank, show "(required)" there.

Catch up with SYSCF for checking generic names like "player".

Fix up handling for some conditionally unused variables.
This commit is contained in:
PatR
2020-10-28 01:43:53 -07:00
parent 70e4f5b197
commit 706977a1e7
2 changed files with 117 additions and 39 deletions
+6
View File
@@ -22,6 +22,7 @@ public slots:
void Quit();
void Random();
void Randomize();
void plnamePlayVsQuit();
void selectName(const QString& n);
void selectRole(int current, int, int previous, int);
@@ -38,9 +39,14 @@ private:
QTableWidget* race;
QRadioButton **gender;
QRadioButton **alignment;
bool fully_specified_role;
int chosen_gend;
int chosen_align;
QPushButton *rand_btn;
QPushButton *play_btn;
QPushButton *quit_btn;
};
} // namespace nethack_qt_