summaryrefslogtreecommitdiff
path: root/src/gui/char_select.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-19 15:09:27 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-19 15:09:27 +0000
commit3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6 (patch)
tree5084eaa47d4874a3a573de226f19c4be072e4888 /src/gui/char_select.cpp
parent19d5cc3a6bbbd911361b7e8b956840d0189d4c2b (diff)
downloadmana-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.tar.gz
mana-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.tar.bz2
mana-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.tar.xz
mana-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.zip
Reverted changeset r2269 (toString) as requested by ElvenProgrammer.
Diffstat (limited to 'src/gui/char_select.cpp')
-rw-r--r--src/gui/char_select.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index 40c1d145..b1d08951 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -23,6 +23,7 @@
#include "char_select.h"
+#include <sstream>
#include <string>
#include <guichan/widgets/label.hpp>
@@ -39,8 +40,6 @@
#include "../net/messageout.h"
-#include "./utils/tostring.h"
-
/**
* Listener for confirming character deletion.
*/
@@ -70,8 +69,7 @@ void CharDeleteConfirm::action(const std::string &eventId)
}
CharSelectDialog::CharSelectDialog(Network *network, LockedArray<LocalPlayer*> *charInfo):
- Window("Select Character"), mNetwork(network),
- mCharInfo(charInfo), mCharSelected(false)
+ Window("Select Character"), mNetwork(network), mCharInfo(charInfo), mCharSelected(false)
{
mSelectButton = new Button("Ok", "ok", this);
mCancelButton = new Button("Cancel", "cancel", this);
@@ -173,10 +171,17 @@ void CharSelectDialog::updatePlayerInfo()
LocalPlayer *pi = mCharInfo->getEntry();
if (pi) {
- mNameLabel->setCaption(pi->getName());
- mLevelLabel->setCaption("Lvl: " + toString(pi->mLevel));
- mJobLevelLabel->setCaption("Job Lvl: " + toString(pi->mJobLevel));
- mMoneyLabel->setCaption("Gold: " + toString(pi->mGp));
+ std::stringstream nameCaption, levelCaption, jobCaption, moneyCaption;
+
+ nameCaption << pi->getName();
+ levelCaption << "Lvl: " << pi->mLevel;
+ jobCaption << "Job Lvl: " << pi->mJobLevel;
+ moneyCaption << "Gold: " << pi->mGp;
+
+ mNameLabel->setCaption(nameCaption.str());
+ mLevelLabel->setCaption(levelCaption.str());
+ mJobLevelLabel->setCaption(jobCaption.str());
+ mMoneyLabel->setCaption(moneyCaption.str());
if (!mCharSelected)
{
mNewCharButton->setEnabled(false);
@@ -186,7 +191,8 @@ void CharSelectDialog::updatePlayerInfo()
mPlayerBox->mHairStyle = pi->getHairStyle() - 1;
mPlayerBox->mHairColor = pi->getHairColor() - 1;
mPlayerBox->mShowPlayer = true;
- } else {
+ }
+ else {
mNameLabel->setCaption("Name");
mLevelLabel->setCaption("Level");
mJobLevelLabel->setCaption("Job Level");