summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-15 21:30:58 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-15 21:33:08 +0100
commita6623430aa11b02f93761d27c25db9bb4157ec6f (patch)
treefbee4b379bbe786a0acfbf5a21d7bc85d88ff77f /src/gui
parent2398fc21de78bb720de672355c7972999a92e47a (diff)
downloadmana-a6623430aa11b02f93761d27c25db9bb4157ec6f.tar.gz
mana-a6623430aa11b02f93761d27c25db9bb4157ec6f.tar.bz2
mana-a6623430aa11b02f93761d27c25db9bb4157ec6f.tar.xz
mana-a6623430aa11b02f93761d27c25db9bb4157ec6f.zip
Fixed compiler warnings
Comparison between signed and unsigned integer expressions.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/char_select.cpp2
-rw-r--r--src/gui/inventorywindow.h2
-rw-r--r--src/gui/status.cpp14
-rw-r--r--src/gui/status.h3
4 files changed, 11 insertions, 10 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index 34174275..208e3b56 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -203,7 +203,7 @@ void CharSelectDialog::updatePlayerInfo()
mNameLabel->setCaption(strprintf(_("Name: %s"), ""));
mLevelLabel->setCaption(strprintf(_("Level: %d"), 0));
mJobLevelLabel->setCaption(strprintf(_("Job Level: %d"), 0));
- mMoneyLabel->setCaption(strprintf(_("Money: %s"), 0));
+ mMoneyLabel->setCaption(strprintf(_("Money: %s"), ""));
mNewDelCharButton->setCaption(_("New"));
mSelectButton->setEnabled(false);
}
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h
index 6c66b95e..45796e74 100644
--- a/src/gui/inventorywindow.h
+++ b/src/gui/inventorywindow.h
@@ -78,7 +78,7 @@ class InventoryWindow : public Window, gcn::ActionListener,
std::string mWeight;
std::string mSlots;
std::string mUsedSlots;
- int mTotalWeight, mMaxWeight;
+ Uint32 mTotalWeight, mMaxWeight;
gcn::Button *mUseButton, *mDropButton;
gcn::ScrollArea *mInvenScroll;
diff --git a/src/gui/status.cpp b/src/gui/status.cpp
index cb02a57a..2c665c7c 100644
--- a/src/gui/status.cpp
+++ b/src/gui/status.cpp
@@ -38,8 +38,7 @@
StatusWindow::StatusWindow(LocalPlayer *player):
Window(player->getName()),
mPlayer(player),
- currency(-1),
- currencyS("?")
+ mCurrency(0)
{
setWindowName(_("Status"));
setCloseButton(true);
@@ -52,7 +51,8 @@ StatusWindow::StatusWindow(LocalPlayer *player):
mLvlLabel = new gcn::Label(strprintf(_("Level: %d"), 0));
mJobLvlLabel = new gcn::Label(strprintf(_("Job: %d"), 0));
- mGpLabel = new gcn::Label(strprintf(_("Money: %s"), ""));
+ mGpLabel = new gcn::Label(strprintf(_("Money: %s"),
+ Units::formatCurrency(mCurrency).c_str()));
mHpLabel = new gcn::Label(_("HP:"));
mHpBar = new ProgressBar(1.0f, 80, 15, 0, 171, 34);
@@ -174,10 +174,10 @@ void StatusWindow::update()
mJobLvlLabel->setCaption(strprintf(_("Job: %d"), mPlayer->mJobLevel));
mJobLvlLabel->adjustSize();
- if (currency != mPlayer->mGp) {
- currency = mPlayer->mGp;
- currencyS = strprintf(_("Money: %s"), Units::formatCurrency(currency).c_str());
- mGpLabel->setCaption(currencyS);
+ if (mCurrency != mPlayer->mGp) {
+ mCurrency = mPlayer->mGp;
+ mGpLabel->setCaption(strprintf(_("Money: %s"),
+ Units::formatCurrency(mCurrency).c_str()));
mGpLabel->adjustSize();
}
diff --git a/src/gui/status.h b/src/gui/status.h
index 7545d696..136c6c3f 100644
--- a/src/gui/status.h
+++ b/src/gui/status.h
@@ -64,7 +64,8 @@ class StatusWindow : public Window, public gcn::ActionListener
* Status Part
*/
gcn::Label *mLvlLabel, *mJobLvlLabel;
- gcn::Label *mGpLabel; int currency; std::string currencyS;
+ gcn::Label *mGpLabel;
+ Uint32 mCurrency;
gcn::Label *mHpLabel, *mMpLabel, *mXpLabel, *mJobLabel;
ProgressBar *mHpBar, *mMpBar;
ProgressBar *mXpBar, *mJobBar;