diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-15 15:08:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-15 15:08:00 +0300 |
commit | 679454f53aa95317f8a1d7a1698c743d98a02fad (patch) | |
tree | a750a9a8306dcbdd129cd7cd209b30225a1ba8cf /src | |
parent | 692a5d9c7cbbc2a5b2e6b53ae9bf9e301ee03754 (diff) | |
download | manaverse-679454f53aa95317f8a1d7a1698c743d98a02fad.tar.gz manaverse-679454f53aa95317f8a1d7a1698c743d98a02fad.tar.bz2 manaverse-679454f53aa95317f8a1d7a1698c743d98a02fad.tar.xz manaverse-679454f53aa95317f8a1d7a1698c743d98a02fad.zip |
Add support for other gender in char creation dialog.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/windows/charcreatedialog.cpp | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index 58363cb76..c8ad72597 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -227,13 +227,35 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, mGenderStrip->setActionEventId("gender_"); // TRANSLATORS: one char size female character gender mGenderStrip->addButton(_("F"), "f", false); - // TRANSLATORS: one char size male character gender - mGenderStrip->addButton(_("M"), "m", false); if (features.getIntValue("forceAccountGender") == -1) { - // TRANSLATORS: one char size unknown character gender - mGenderStrip->addButton(_("U"), "u", true); + if (serverFeatures->haveCharOtherGender()) + { + // TRANSLATORS: one char size male character gender + mGenderStrip->addButton(_("M"), "m", true); + // TRANSLATORS: one char size other character gender + mGenderStrip->addButton(_("O"), "o", false); + } + else + { + // TRANSLATORS: one char size male character gender + mGenderStrip->addButton(_("M"), "m", false); + // TRANSLATORS: one char size unknown character gender + mGenderStrip->addButton(_("U"), "u", true); + } } + else + { + // TRANSLATORS: one char size male character gender + mGenderStrip->addButton(_("M"), "m", true); + if (serverFeatures->haveCharOtherGender()) + { + // TRANSLATORS: one char size other character gender + mGenderStrip->addButton(_("O"), "o", false); + } + } + + mGenderStrip->setVisible(Visible_true); add(mGenderStrip); @@ -488,6 +510,11 @@ void CharCreateDialog::action(const ActionEvent &event) mGender = Gender::UNSPECIFIED; mPlayer->setGender(mDefaultGender); } + else if (id == "gender_o") + { + mGender = Gender::OTHER; + mPlayer->setGender(Gender::OTHER); + } } std::string CharCreateDialog::getName() const |