summaryrefslogtreecommitdiff
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
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.
-rw-r--r--src/gui/serverdialog.cpp2
-rw-r--r--src/gui/theme.cpp2
-rw-r--r--src/gui/theme.h2
-rw-r--r--src/gui/widgets/dropshortcutcontainer.cpp10
-rw-r--r--src/gui/widgets/dropshortcutcontainer.h2
-rw-r--r--src/gui/widgets/itemcontainer.cpp8
-rw-r--r--src/gui/widgets/itemcontainer.h2
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp10
-rw-r--r--src/gui/widgets/itemshortcutcontainer.h2
9 files changed, 30 insertions, 10 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 07c3f2df3..9294742c0 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -233,7 +233,7 @@ public:
if (info.version.first > 0)
{
- graphics->setColorAll(mNotSupportedColor, mNotSupportedColor2);
+ g->setColorAll(mNotSupportedColor, mNotSupportedColor2);
font2->drawString(graphics, info.version.second,
width - info.version.first - mPadding, top);
}
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 99d35bb69..66d529d85 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -847,7 +847,9 @@ static int readColorType(const std::string &type)
"TAB_PLAYER_FLASH_OUTLINE",
"SHOP_WARNING",
"ITEM_EQUIPPED",
+ "ITEM_EQUIPPED_OUTLINE",
"ITEM_NOT_EQUIPPED",
+ "ITEM_NOT_EQUIPPED_OUTLINE",
"CHAT",
"CHAT_OUTLINE",
"GM",
diff --git a/src/gui/theme.h b/src/gui/theme.h
index 47b4a8cb8..ef3db572f 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -287,7 +287,9 @@ class Theme final : public Palette, public ConfigListener
TAB_PLAYER_FLASH_OUTLINE,
SHOP_WARNING,
ITEM_EQUIPPED,
+ ITEM_EQUIPPED_OUTLINE,
ITEM_NOT_EQUIPPED,
+ ITEM_NOT_EQUIPPED_OUTLINE,
CHAT,
CHAT_OUTLINE,
GM,
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);
diff --git a/src/gui/widgets/dropshortcutcontainer.h b/src/gui/widgets/dropshortcutcontainer.h
index 9d3cf5903..62f52a858 100644
--- a/src/gui/widgets/dropshortcutcontainer.h
+++ b/src/gui/widgets/dropshortcutcontainer.h
@@ -85,7 +85,9 @@ class DropShortcutContainer final : public ShortcutContainer
ItemPopup *mItemPopup;
gcn::Color mEquipedColor;
+ gcn::Color mEquipedColor2;
gcn::Color mUnEquipedColor;
+ gcn::Color mUnEquipedColor2;
};
#endif
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index bbdaf0d20..f65624eae 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -186,7 +186,9 @@ ItemContainer::ItemContainer(const Widget2 *const widget,
mPaddingItemY(mSkin ? mSkin->getOption("paddingItemY", 0) : 0),
mSelectionListeners(),
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))
{
setFocusable(true);
addKeyListener(this);
@@ -316,9 +318,9 @@ void ItemContainer::draw(gcn::Graphics *graphics)
}
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,
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index 4dd1640a0..395f885eb 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -222,7 +222,9 @@ class ItemContainer final : public gcn::Widget,
SelectionListenerList mSelectionListeners;
gcn::Color mEquipedColor;
+ gcn::Color mEquipedColor2;
gcn::Color mUnEquipedColor;
+ gcn::Color mUnEquipedColor2;
};
#endif
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index 6a5392f14..4ece1c853 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -53,7 +53,9 @@ ItemShortcutContainer::ItemShortcutContainer(const unsigned number) :
mItemPopup(new ItemPopup),
mSpellPopup(new SpellPopup),
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);
@@ -97,7 +99,9 @@ void ItemShortcutContainer::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);
mForegroundColor = getThemeColor(Theme::TEXT);
mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE);
}
@@ -169,9 +173,9 @@ void ItemShortcutContainer::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);
diff --git a/src/gui/widgets/itemshortcutcontainer.h b/src/gui/widgets/itemshortcutcontainer.h
index cab8756b4..97ad0db27 100644
--- a/src/gui/widgets/itemshortcutcontainer.h
+++ b/src/gui/widgets/itemshortcutcontainer.h
@@ -88,7 +88,9 @@ class ItemShortcutContainer final : public ShortcutContainer
ItemPopup *mItemPopup;
SpellPopup *mSpellPopup;
gcn::Color mEquipedColor;
+ gcn::Color mEquipedColor2;
gcn::Color mUnEquipedColor;
+ gcn::Color mUnEquipedColor2;
gcn::Color mForegroundColor2;
};