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.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp
index a1233fdcc..641e07db6 100644
--- a/src/gui/charcreatedialog.cpp
+++ b/src/gui/charcreatedialog.cpp
@@ -47,6 +47,7 @@
#include "resources/chardb.h"
#include "resources/colordb.h"
#include "resources/itemdb.h"
+#include "resources/iteminfo.h"
#include "utils/gettext.h"
#include "utils/stringutils.h"
@@ -99,6 +100,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *parent, int slot):
mNextRaceButton = new Button(_(">"), "nextrace", this);
mPrevRaceButton = new Button(_("<"), "prevrace", this);
mRaceLabel = new Label(_("Race:"));
+ mRaceNameLabel = new Label("qwerty");
}
mCreateButton = new Button(_("Create"), "create", this);
@@ -143,6 +145,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *parent, int slot):
mPrevRaceButton->setPosition(155, 93);
mNextRaceButton->setPosition(230, 93);
mRaceLabel->setPosition(5, 100);
+ mRaceNameLabel->setPosition(5, 118);
}
mAttributesLeft->setPosition(15, 280);
@@ -172,6 +175,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *parent, int slot):
add(mNextRaceButton);
add(mPrevRaceButton);
add(mRaceLabel);
+ add(mRaceNameLabel);
}
add(mAttributesLeft);
@@ -184,6 +188,8 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *parent, int slot):
center();
setVisible(true);
mNameField->requestFocus();
+ if (serverVersion >= 2)
+ updateRace();
}
CharCreateDialog::~CharCreateDialog()
@@ -448,4 +454,6 @@ void CharCreateDialog::updateRace()
}
mPlayer->setSubtype(mRace);
+ const ItemInfo &item = ItemDB::get(id);
+ mRaceNameLabel->setCaption(item.getName());
}
diff --git a/src/gui/charcreatedialog.h b/src/gui/charcreatedialog.h
index e369f1777..065b532c4 100644
--- a/src/gui/charcreatedialog.h
+++ b/src/gui/charcreatedialog.h
@@ -101,6 +101,7 @@ class CharCreateDialog : public Window, public gcn::ActionListener
gcn::Button *mNextRaceButton;
gcn::Button *mPrevRaceButton;
gcn::Label *mRaceLabel;
+ gcn::Label *mRaceNameLabel;
gcn::RadioButton *mMale;
gcn::RadioButton *mFemale;