diff options
-rw-r--r-- | src/gui/char_select.cpp | 2 | ||||
-rw-r--r-- | src/gui/inventorywindow.h | 2 | ||||
-rw-r--r-- | src/gui/status.cpp | 14 | ||||
-rw-r--r-- | src/gui/status.h | 3 | ||||
-rw-r--r-- | src/units.cpp | 4 |
5 files changed, 13 insertions, 12 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; diff --git a/src/units.cpp b/src/units.cpp index 8fa11c9f..3c02fb05 100644 --- a/src/units.cpp +++ b/src/units.cpp @@ -188,7 +188,7 @@ std::string formatUnit(const int value, const int type) pl.symbol.c_str()); } - for (int i = 2; i < ud.levels.size(); i++) + for (unsigned int i = 2; i < ud.levels.size(); i++) { pl = ul; ul = ud.levels[i]; @@ -207,7 +207,7 @@ std::string formatUnit(const int value, const int type) } else { - for (int i = 0; i < ud.levels.size(); i++) + for (unsigned int i = 0; i < ud.levels.size(); i++) { ul = ud.levels[i]; if (amount < ul.count && ul.count > 0) { |