summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/storagewindow.cpp4
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)
{