summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2020-05-07 11:11:08 +0300
committerAndrei Karas <akaras@inbox.ru>2020-05-07 11:15:38 +0300
commitf033f4f0fb66cac4a995e6a421135c514f039a77 (patch)
tree53323c2f67870ff6ff265e9ce620e7998d4cd0eb /src/gui
parent403d28fffdec3b369f8f2ae86eff5d4634317b1a (diff)
downloadmanaplus-f033f4f0fb66cac4a995e6a421135c514f039a77.tar.gz
manaplus-f033f4f0fb66cac4a995e6a421135c514f039a77.tar.bz2
manaplus-f033f4f0fb66cac4a995e6a421135c514f039a77.tar.xz
manaplus-f033f4f0fb66cac4a995e6a421135c514f039a77.zip
Add option for show/hide hidden gender
By default hidden gender is hidden.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/charcreatedialog.cpp9
-rw-r--r--src/gui/windows/charcreatedialog.h2
2 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 17d993f1a..b2913ce68 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -139,7 +139,8 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
maxHairStyle(CharDB::getMaxHairStyle()),
minHairStyle(CharDB::getMinHairStyle()),
mAction(0),
- mDirection(0)
+ mDirection(0),
+ mShowHiddenGender(CharDB::getShowHiddenGender())
{
setStickyButtonLock(true);
setSticky(true);
@@ -285,7 +286,8 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
mGenderStrip->addButton(_("F"), "f", false);
if (features.getIntValue("forceAccountGender") == -1)
{
- if (serverFeatures->haveCharHiddenGender())
+ if (mShowHiddenGender &&
+ serverFeatures->haveCharHiddenGender())
{
// TRANSLATORS: one char size male character gender
mGenderStrip->addButton(_("M"), "m", true);
@@ -304,7 +306,8 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
{
// TRANSLATORS: one char size male character gender
mGenderStrip->addButton(_("M"), "m", true);
- if (serverFeatures->haveCharHiddenGender())
+ if (mShowHiddenGender &&
+ serverFeatures->haveCharHiddenGender())
{
// TRANSLATORS: one char size hidden character gender
mGenderStrip->addButton(_("H"), "h", false);
diff --git a/src/gui/windows/charcreatedialog.h b/src/gui/windows/charcreatedialog.h
index c3e79133b..1d93d998a 100644
--- a/src/gui/windows/charcreatedialog.h
+++ b/src/gui/windows/charcreatedialog.h
@@ -166,6 +166,8 @@ class CharCreateDialog final : public Window,
unsigned int mAction;
unsigned int mDirection;
+
+ bool mShowHiddenGender;
};
#endif // GUI_WINDOWS_CHARCREATEDIALOG_H