From c6bbebbb52e08c456facaf4649f0d5ea3f45840d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 5 Jan 2015 16:54:23 +0300 Subject: Remove legace gender specific code from char creation dialog. --- src/gui/windows/charcreatedialog.cpp | 58 ------------------------------------ 1 file changed, 58 deletions(-) (limited to 'src/gui/windows/charcreatedialog.cpp') diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index 4d2e4ae2d..802340dd3 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -113,12 +113,6 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, mActionButton(new Button(this, _("^"), "action", this)), // TRANSLATORS: char create dialog button mRotateButton(new Button(this, _(">"), "rotate", this)), - // TRANSLATORS: char create dialog button - mMale(new RadioButton(this, _("Male"), "gender")), - // TRANSLATORS: char create dialog button - mFemale(new RadioButton(this, _("Female"), "gender")), - // TRANSLATORS: char create dialog button - mOther(new RadioButton(this, _("Other"), "gender")), mAttributeSlider(), mAttributeLabel(), mAttributeValue(), @@ -238,17 +232,6 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, mGenderStrip->setHeight(50); } - // Default to a Male character - mMale->setSelected(true); - - mMale->setActionEventId("gender"); - mFemale->setActionEventId("gender"); - mOther->setActionEventId("gender"); - - mMale->addActionListener(this); - mFemale->addActionListener(this); - mOther->addActionListener(this); - mPlayerBox->setWidth(74); mNameField->setActionEventId("create"); @@ -302,10 +285,6 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, updateSliders(); setButtonsPosition(w, h); - mMale->setPosition(30, 120); - mFemale->setPosition(100, 120); - mOther->setPosition(170, 120); - add(mPlayerBox); add(mNameField); add(mNameLabel); @@ -340,10 +319,6 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, add(mCreateButton); add(mCancelButton); - add(mMale); - add(mFemale); - add(mOther); - center(); setVisible(true); mNameField->requestFocus(); @@ -454,13 +429,6 @@ void CharCreateDialog::action(const ActionEvent &event) { updateSliders(); } - else if (id == "gender") - { - if (mMale->isSelected()) - mPlayer->setGender(Gender::MALE); - else - mPlayer->setGender(Gender::FEMALE); - } else if (id == "action") { mAction ++; @@ -614,33 +582,7 @@ void CharCreateDialog::setFixedGender(const bool fixed, const Gender::Type gender) { mDefaultGender = gender; - if (gender == Gender::FEMALE) - { - mFemale->setSelected(true); - mMale->setSelected(false); - mOther->setSelected(false); - } - else if (gender == Gender::MALE) - { - mFemale->setSelected(false); - mMale->setSelected(true); - mOther->setSelected(false); - } - else - { - mFemale->setSelected(false); - mMale->setSelected(false); - mOther->setSelected(true); - } - mPlayer->setGender(gender); - - if (fixed) - { - mMale->setVisible(false); - mFemale->setVisible(false); - mOther->setVisible(false); - } } void CharCreateDialog::updateHair() -- cgit v1.2.3-70-g09d2