summaryrefslogtreecommitdiff
path: root/src/gui/itempopup.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-08 04:40:39 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-08 04:41:10 +0200
commitc17acf93cb4ebe698b0af8a38a1fd6d49a6be3cc (patch)
treedcbcde05b894da2ee7e83f2c62742565c2457b88 /src/gui/itempopup.cpp
parent7646d773e826b222b94b951f777256b23dbf98ac (diff)
downloadmv-c17acf93cb4ebe698b0af8a38a1fd6d49a6be3cc.tar.gz
mv-c17acf93cb4ebe698b0af8a38a1fd6d49a6be3cc.tar.bz2
mv-c17acf93cb4ebe698b0af8a38a1fd6d49a6be3cc.tar.xz
mv-c17acf93cb4ebe698b0af8a38a1fd6d49a6be3cc.zip
Add possible colors to item popups.
Diffstat (limited to 'src/gui/itempopup.cpp')
-rw-r--r--src/gui/itempopup.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index 109e2edf8..d7f67ff0c 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -97,7 +97,7 @@ void ItemPopup::setItem(const Item *item, bool showImage)
return;
const ItemInfo &ii = item->getInfo();
- setItem(ii, showImage);
+ setItem(ii, item->getColor(), showImage);
if (item->getRefine() > 0)
{
mItemName->setCaption(strprintf("%s (+%d), %d", ii.getName().c_str(),
@@ -109,7 +109,8 @@ void ItemPopup::setItem(const Item *item, bool showImage)
}
}
-void ItemPopup::setItem(const ItemInfo &item, bool showImage)
+void ItemPopup::setItem(const ItemInfo &item, unsigned char color,
+ bool showImage)
{
if (!mIcon || item.getName() == mItemName->getCaption())
return;
@@ -123,9 +124,12 @@ void ItemPopup::setItem(const ItemInfo &item, bool showImage)
if (showImage)
{
ResourceManager *resman = ResourceManager::getInstance();
- Image *image = resman->getImage(
+ logger->log("img: " + combineDye2(
paths.getStringValue("itemIcons")
- + item.getDisplay().image);
+ + item.getDisplay().image, item.getDyeColorsString(color)));
+ Image *image = resman->getImage(combineDye2(
+ paths.getStringValue("itemIcons")
+ + item.getDisplay().image, item.getDyeColorsString(color)));
mIcon->setImage(image);
if (image)