summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/itemcontainer.cpp')
-rw-r--r--src/gui/widgets/itemcontainer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index c28e4fb4c..91b674018 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -118,6 +118,9 @@ ItemContainer::ItemContainer(Inventory *inventory, bool forceQuantity):
if (!mSelImg)
logger->log1("Error: Unable to load selection.png");
+ mEquipedColor = Theme::getThemeColor(Theme::ITEM_EQUIPPED);
+ mUnEquipedColor = Theme::getThemeColor(Theme::ITEM_NOT_EQUIPPED);
+
addKeyListener(this);
addMouseListener(this);
addWidgetListener(this);
@@ -204,9 +207,9 @@ void ItemContainer::draw(gcn::Graphics *graphics)
caption = "Eq.";
if (item->isEquipped())
- g->setColor(Theme::getThemeColor(Theme::ITEM_EQUIPPED));
+ g->setColor(mEquipedColor);
else
- g->setColor(Theme::getThemeColor(Theme::ITEM_NOT_EQUIPPED));
+ g->setColor(mUnEquipedColor);
g->drawText(caption, itemX + BOX_WIDTH / 2,
itemY + BOX_HEIGHT - 14, gcn::Graphics::CENTER);