From 07f7d52f661a74e6d0c780ca53e724651e3dcc48 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 9 Feb 2009 22:30:00 +0100 Subject: Mostly whitespace fixes Removed tab characters and trailing spaces and added spaces between "if(", "for(", "while(" and "switch(". --- src/gui/inventorywindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/inventorywindow.cpp') diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 58c13910..3b868610 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -59,11 +59,11 @@ InventoryWindow::InventoryWindow(int invSize): // If you adjust these defaults, don't forget to adjust the trade window's. setDefaultSize(115, 25, 375, 300); - std::string longestUseString = getFont()->getWidth(_("Equip")) > + std::string longestUseString = getFont()->getWidth(_("Equip")) > getFont()->getWidth(_("Use")) ? _("Equip") : _("Use"); - if (getFont()->getWidth(longestUseString) < + if (getFont()->getWidth(longestUseString) < getFont()->getWidth(_("Unequip"))) { longestUseString = _("Unequip"); @@ -140,7 +140,7 @@ void InventoryWindow::logic() // Adjust progress bars mSlotsBar->setProgress((float) player_node->getInventory()->getNumberOfSlotsUsed() / mMaxSlots); - mWeightBar->setProgress((float) player_node->mTotalWeight / + mWeightBar->setProgress((float) player_node->mTotalWeight / player_node->mMaxWeight); mSlotsBar->setText(strprintf("%s/%d", mUsedSlots.c_str(), mMaxSlots)); -- cgit v1.2.3-70-g09d2