summaryrefslogtreecommitdiff
path: root/src/gui/charcreatedialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-29 05:45:10 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-29 05:45:10 +0300
commitcc3d90c515331acab2f888fe9c3e72ed321f7f1a (patch)
treefa0079b4404b81ef279569312ce8fd319f31af84 /src/gui/charcreatedialog.cpp
parent1400abb6cfd9596e2b9430385d68e6527f6b0d2b (diff)
downloadmv-cc3d90c515331acab2f888fe9c3e72ed321f7f1a.tar.gz
mv-cc3d90c515331acab2f888fe9c3e72ed321f7f1a.tar.bz2
mv-cc3d90c515331acab2f888fe9c3e72ed321f7f1a.tar.xz
mv-cc3d90c515331acab2f888fe9c3e72ed321f7f1a.zip
Show race name in char creation dialog.
Diffstat (limited to 'src/gui/charcreatedialog.cpp')
-rw-r--r--src/gui/charcreatedialog.cpp8
1 files changed, 8 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());
}