summaryrefslogtreecommitdiff
path: root/src/gui/equipmentwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/equipmentwindow.cpp')
-rw-r--r--src/gui/equipmentwindow.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp
index 3284301ec..3abd97c73 100644
--- a/src/gui/equipmentwindow.cpp
+++ b/src/gui/equipmentwindow.cpp
@@ -99,6 +99,9 @@ EquipmentWindow::EquipmentWindow(Equipment *equipment, Being *being,
add(mPlayerBox);
add(mUnequip);
+ mHighlightColor = Theme::getThemeColor(Theme::HIGHLIGHT);
+ mBorderColor = Theme::getThemeColor(Theme::BORDER);
+ setForegroundColor(Theme::getThemeColor(Theme::TEXT));
}
EquipmentWindow::~EquipmentWindow()
@@ -138,16 +141,15 @@ void EquipmentWindow::draw(gcn::Graphics *graphics)
continue;
if (i == mSelected)
{
- const gcn::Color color = Theme::getThemeColor(Theme::HIGHLIGHT);
-
+ mHighlightColor.a = getGuiAlpha();
// Set color to the highlight color
- g->setColor(gcn::Color(color.r, color.g, color.b, getGuiAlpha()));
+ g->setColor(mHighlightColor);
g->fillRectangle(gcn::Rectangle(box->first,
box->second, BOX_WIDTH, BOX_HEIGHT));
}
// Set color black
- g->setColor(Theme::getThemeColor(Theme::BORDER));
+ g->setColor(mBorderColor);
// Draw box border
g->drawRectangle(gcn::Rectangle(box->first, box->second,
BOX_WIDTH, BOX_HEIGHT));
@@ -167,7 +169,7 @@ void EquipmentWindow::draw(gcn::Graphics *graphics)
g->drawImage(image, box->first + 2, box->second + 2);
if (i == EQUIP_PROJECTILE_SLOT)
{
- g->setColor(Theme::getThemeColor(Theme::TEXT));
+ g->setColor(getForegroundColor());
graphics->drawText(toString(item->getQuantity()),
box->first + (BOX_WIDTH / 2),
box->second - fontHeight,