summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/charcreatedialog.cpp8
-rw-r--r--src/gui/charcreatedialog.h6
-rw-r--r--src/gui/register.cpp3
3 files changed, 9 insertions, 8 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp
index b9dc54a8..024d18b3 100644
--- a/src/gui/charcreatedialog.cpp
+++ b/src/gui/charcreatedialog.cpp
@@ -203,7 +203,7 @@ void CharCreateDialog::action(const gcn::ActionEvent &event)
}
}
-std::string CharCreateDialog::getName()
+std::string CharCreateDialog::getName() const
{
std::string name = mNameField->getText();
trim(name);
@@ -248,7 +248,7 @@ void CharCreateDialog::unlock()
mCreateButton->setEnabled(true);
}
-int CharCreateDialog::getDistributedPoints()
+int CharCreateDialog::getDistributedPoints() const
{
int points = 0;
@@ -310,9 +310,9 @@ void CharCreateDialog::setAttributes(std::vector<std::string> labels,
h - 5 - mCancelButton->getHeight());
}
-void CharCreateDialog::setFixedGender(bool fixed, bool gender)
+void CharCreateDialog::setFixedGender(bool fixed, Gender gender)
{
- if (gender)
+ if (gender == GENDER_FEMALE)
{
mFemale->setSelected(true);
mMale->setSelected(false);
diff --git a/src/gui/charcreatedialog.h b/src/gui/charcreatedialog.h
index 8897b5f7..5dbc6050 100644
--- a/src/gui/charcreatedialog.h
+++ b/src/gui/charcreatedialog.h
@@ -65,17 +65,17 @@ class CharCreateDialog : public Window, public gcn::ActionListener
void setAttributes(std::vector<std::string> labels, int available,
int min, int max);
- void setFixedGender(bool fixed, bool gender = false);
+ void setFixedGender(bool fixed, Gender gender = GENDER_FEMALE);
private:
- int getDistributedPoints();
+ int getDistributedPoints() const;
void updateSliders();
/**
* Returns the name of the character to create.
*/
- std::string getName();
+ std::string getName() const;
/**
* Communicate character creation to the server.
diff --git a/src/gui/register.cpp b/src/gui/register.cpp
index 8442c3ea..04da656b 100644
--- a/src/gui/register.cpp
+++ b/src/gui/register.cpp
@@ -232,7 +232,8 @@ void RegisterDialog::action(const gcn::ActionEvent &event)
#ifdef EATHENA_SUPPORT
mLoginData->hostname = mServerField->getText();
mLoginData->port = getUShort(mPortField->getText());
- mLoginData->username += mFemaleButton->isSelected() ? "_F" : "_M";
+ mLoginData->sex =
+ mFemaleButton->isSelected() ? GENDER_FEMALE : GENDER_MALE;
#else
mLoginData->email = mEmailField->getText();
#endif