diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-14 03:56:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-14 04:06:13 +0300 |
commit | 112d2ad1904051160822d1845d1418cca889c0d5 (patch) | |
tree | 9731934d9dc367f931c028158f3d26a670e18feb /src/gui/charcreatedialog.cpp | |
parent | 02e9a62ce9a0f288804bfa2aa59c3a84b0376c4a (diff) | |
download | plus-112d2ad1904051160822d1845d1418cca889c0d5.tar.gz plus-112d2ad1904051160822d1845d1418cca889c0d5.tar.bz2 plus-112d2ad1904051160822d1845d1418cca889c0d5.tar.xz plus-112d2ad1904051160822d1845d1418cca889c0d5.zip |
Add support for other gender.
Fix per gender and race items separation.
Diffstat (limited to 'src/gui/charcreatedialog.cpp')
-rw-r--r-- | src/gui/charcreatedialog.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp index 124476f1c..0b20952c8 100644 --- a/src/gui/charcreatedialog.cpp +++ b/src/gui/charcreatedialog.cpp @@ -124,15 +124,18 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *parent, int slot): mCancelButton = new Button(_("Cancel"), "cancel", this); mMale = new RadioButton(_("Male"), "gender"); mFemale = new RadioButton(_("Female"), "gender"); + mOther = new RadioButton(_("Other"), "gender"); // Default to a Male character mMale->setSelected(true); mMale->setActionEventId("gender"); mFemale->setActionEventId("gender"); + mOther->setActionEventId("gender"); mMale->addActionListener(this); mFemale->addActionListener(this); + mOther->addActionListener(this); mPlayerBox = new PlayerBox(mPlayer); mPlayerBox->setWidth(74); @@ -186,6 +189,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *parent, int slot): mMale->setPosition(30, 120); mFemale->setPosition(100, 120); + mOther->setPosition(170, 120); add(mPlayerBox); add(mNameField); @@ -215,6 +219,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *parent, int slot): add(mMale); add(mFemale); + add(mOther); center(); setVisible(true); @@ -453,11 +458,19 @@ void CharCreateDialog::setFixedGender(bool fixed, Gender gender) { mFemale->setSelected(true); mMale->setSelected(false); + mOther->setSelected(false); } - else + else if (gender == GENDER_MALE) { + mFemale->setSelected(false); mMale->setSelected(true); + mOther->setSelected(false); + } + else + { mFemale->setSelected(false); + mMale->setSelected(false); + mOther->setSelected(true); } mPlayer->setGender(gender); @@ -466,6 +479,7 @@ void CharCreateDialog::setFixedGender(bool fixed, Gender gender) { mMale->setVisible(false); mFemale->setVisible(false); + mOther->setVisible(false); } } |