diff options
author | Ira Rice <irarice@gmail.com> | 2009-04-06 23:15:55 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-06 23:16:32 +0200 |
commit | cabcfa72cbe87f033304d403c279e525a7af93c7 (patch) | |
tree | c252addac0b1e633fc95c91b325ba3b5db919727 | |
parent | fc70e6ca13c8134057bb0694e157d88e83b6ea17 (diff) | |
download | mana-cabcfa72cbe87f033304d403c279e525a7af93c7.tar.gz mana-cabcfa72cbe87f033304d403c279e525a7af93c7.tar.bz2 mana-cabcfa72cbe87f033304d403c279e525a7af93c7.tar.xz mana-cabcfa72cbe87f033304d403c279e525a7af93c7.zip |
Fixed bar progress on the storage window when initially opened.
Signed-off-by: Ira Rice <irarice@gmail.com>
Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
-rw-r--r-- | src/gui/storagewindow.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/storagewindow.cpp b/src/gui/storagewindow.cpp index 7daf8045..073b3ac8 100644 --- a/src/gui/storagewindow.cpp +++ b/src/gui/storagewindow.cpp @@ -75,6 +75,8 @@ StorageWindow::StorageWindow(int invSize): mSlotsLabel = new Label(_("Slots: ")); mSlotsBar = new ProgressBar(1.0f, 100, 20, 225, 200, 25); + mSlotsBar->setText(strprintf("%d/%d", mUsedSlots, mMaxSlots)); + mSlotsBar->setProgress((float) mUsedSlots / mMaxSlots); setMinHeight(130); setMinWidth(mSlotsLabel->getWidth()); @@ -103,7 +105,7 @@ void StorageWindow::logic() Window::logic(); - const int usedSlots = player_node->getInventory()->getNumberOfSlotsUsed(); + const int usedSlots = player_node->getStorage()->getNumberOfSlotsUsed(); if (mUsedSlots != usedSlots) { |