summaryrefslogtreecommitdiff
path: root/src/gui/widgets/dropshortcutcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-06 00:29:15 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-06 00:29:15 +0300
commita0f912da93b0b1c68e72cc7a4257031595b73f15 (patch)
tree0252843536eb840be260e7fec333bf6a914f9313 /src/gui/widgets/dropshortcutcontainer.cpp
parent4b51940253b83e2cbb8bf92f9c81b0a3b0ce2664 (diff)
downloadplus-a0f912da93b0b1c68e72cc7a4257031595b73f15.tar.gz
plus-a0f912da93b0b1c68e72cc7a4257031595b73f15.tar.bz2
plus-a0f912da93b0b1c68e72cc7a4257031595b73f15.tar.xz
plus-a0f912da93b0b1c68e72cc7a4257031595b73f15.zip
Add outline colors for ITEM_EQUIPPED and ITEM_NOT_EQUIPPED.
Diffstat (limited to 'src/gui/widgets/dropshortcutcontainer.cpp')
-rw-r--r--src/gui/widgets/dropshortcutcontainer.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp
index bc6b3d878..d1c7b72c7 100644
--- a/src/gui/widgets/dropshortcutcontainer.cpp
+++ b/src/gui/widgets/dropshortcutcontainer.cpp
@@ -45,7 +45,9 @@ DropShortcutContainer::DropShortcutContainer():
mItemMoved(nullptr),
mItemPopup(new ItemPopup),
mEquipedColor(getThemeColor(Theme::ITEM_EQUIPPED)),
- mUnEquipedColor(getThemeColor(Theme::ITEM_NOT_EQUIPPED))
+ mEquipedColor2(getThemeColor(Theme::ITEM_EQUIPPED_OUTLINE)),
+ mUnEquipedColor(getThemeColor(Theme::ITEM_NOT_EQUIPPED)),
+ mUnEquipedColor2(getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE))
{
addMouseListener(this);
addWidgetListener(this);
@@ -85,7 +87,9 @@ void DropShortcutContainer::setWidget2(const Widget2 *const widget)
{
Widget2::setWidget2(widget);
mEquipedColor = getThemeColor(Theme::ITEM_EQUIPPED);
+ mEquipedColor2 = getThemeColor(Theme::ITEM_EQUIPPED_OUTLINE);
mUnEquipedColor = getThemeColor(Theme::ITEM_NOT_EQUIPPED);
+ mUnEquipedColor2 = getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE);
}
void DropShortcutContainer::draw(gcn::Graphics *graphics)
@@ -140,9 +144,9 @@ void DropShortcutContainer::draw(gcn::Graphics *graphics)
image->setAlpha(1.0f);
g->drawImage(image, itemX, itemY);
if (item->isEquipped())
- g->setColor(mEquipedColor);
+ g->setColorAll(mEquipedColor, mEquipedColor2);
else
- g->setColor(mUnEquipedColor);
+ g->setColorAll(mUnEquipedColor, mUnEquipedColor2);
font->drawString(g, caption,
itemX + (mBoxWidth - font->getWidth(caption)) / 2,
itemY + mBoxHeight - 14);