diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-25 21:52:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-25 21:52:27 +0300 |
commit | 5b47e947e687105a4c17eb685da6d204823b66c5 (patch) | |
tree | aa79b2bacd67d5b6e18cc40b48744523199a8097 | |
parent | a857f7d766f9cdce715825b35badeedac6d3f286 (diff) | |
download | mv-5b47e947e687105a4c17eb685da6d204823b66c5.tar.gz mv-5b47e947e687105a4c17eb685da6d204823b66c5.tar.bz2 mv-5b47e947e687105a4c17eb685da6d204823b66c5.tar.xz mv-5b47e947e687105a4c17eb685da6d204823b66c5.zip |
In char creation dialog show race fields only if more than 1 races in configuration.
-rw-r--r-- | src/gui/windows/charcreatedialog.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index 5c81c51eb..cce6b3d2a 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -192,7 +192,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, mNameField->setMaximum(24); - if (serverFeatures->haveRaceSelection()) + if (serverFeatures->haveRaceSelection() && mMinRace < mMaxRace) { // TRANSLATORS: char create dialog button mNextRaceButton = new Button(this, _(">"), "nextrace", this); @@ -315,7 +315,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, if (mLookNameLabel) mLookNameLabel->setPosition(nameX, y); // 93 } - if (serverFeatures->haveRaceSelection()) + if (serverFeatures->haveRaceSelection() && mMinRace < mMaxRace) { y += 24; if (mPrevRaceButton) @@ -355,7 +355,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, add(mLookNameLabel); } - if (serverFeatures->haveRaceSelection()) + if (serverFeatures->haveRaceSelection() && mMinRace < mMaxRace) { add(mNextRaceButton); add(mPrevRaceButton); @@ -372,7 +372,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, mNameField->requestFocus(); updateHair(); - if (serverFeatures->haveRaceSelection()) + if (serverFeatures->haveRaceSelection() && mMinRace < mMaxRace) updateRace(); if (serverFeatures->haveLookSelection() && mMinLook < mMaxLook) updateLook(); @@ -601,7 +601,7 @@ void CharCreateDialog::setAttributes(const StringVect &labels, int y = 89; if (serverFeatures->haveLookSelection() && mMinLook < mMaxLook) y += 29; - if (serverFeatures->haveRaceSelection()) + if (serverFeatures->haveRaceSelection() && mMinRace < mMaxRace) y += 29; for (unsigned i = 0, sz = static_cast<unsigned>(labels.size()); |