summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-15 15:08:00 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-15 15:08:00 +0300
commit679454f53aa95317f8a1d7a1698c743d98a02fad (patch)
treea750a9a8306dcbdd129cd7cd209b30225a1ba8cf
parent692a5d9c7cbbc2a5b2e6b53ae9bf9e301ee03754 (diff)
downloadmv-679454f53aa95317f8a1d7a1698c743d98a02fad.tar.gz
mv-679454f53aa95317f8a1d7a1698c743d98a02fad.tar.bz2
mv-679454f53aa95317f8a1d7a1698c743d98a02fad.tar.xz
mv-679454f53aa95317f8a1d7a1698c743d98a02fad.zip
Add support for other gender in char creation dialog.
-rw-r--r--src/gui/windows/charcreatedialog.cpp35
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