From 679454f53aa95317f8a1d7a1698c743d98a02fad Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 15 Nov 2015 15:08:00 +0300 Subject: Add support for other gender in char creation dialog. --- src/gui/windows/charcreatedialog.cpp | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'src/gui') 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 -- cgit v1.2.3-70-g09d2