summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index ed008e63..701558a9 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -30,6 +30,7 @@
#include "gui/itemamount.h"
#include "gui/setup.h"
#include "gui/sdlinput.h"
+#include "gui/theme.h"
#include "gui/viewport.h"
#include "gui/widgets/button.h"
@@ -96,8 +97,8 @@ InventoryWindow::InventoryWindow(int invSize):
mSlotsLabel = new Label(_("Slots:"));
mWeightLabel = new Label(_("Weight:"));
- mSlotsBar = new ProgressBar(0.0f, 100, 20, gcn::Color(225, 200, 25));
- mWeightBar = new ProgressBar(0.0f, 100, 20, gcn::Color(0, 0, 255));
+ mSlotsBar = new ProgressBar(0.0f, 100, 20, Theme::PROG_INVY_SLOTS);
+ mWeightBar = new ProgressBar(0.0f, 100, 20, Theme::PROG_WEIGHT);
place(0, 0, mWeightLabel).setPadding(3);
place(1, 0, mWeightBar, 3);
@@ -140,14 +141,6 @@ void InventoryWindow::logic()
mMaxWeight = player_node->getMaxWeight();
mUsedSlots = usedSlots;
- // Weight Bar coloration
- if (mTotalWeight < (mMaxWeight / 3))
- mWeightBar->setColor(0, 0, 255); // Blue
- else if (mTotalWeight < ((mMaxWeight * 2) / 3))
- mWeightBar->setColor(255, 255, 0); // Yellow
- else
- mWeightBar->setColor(255, 0, 0); // Red
-
// Adjust progress bars
mSlotsBar->setProgress((float) mUsedSlots / mMaxSlots);
mWeightBar->setProgress((float) mTotalWeight / mMaxWeight);