summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-15 00:10:31 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-15 00:10:31 +0300
commit62651de51245ed7377bfdbf3212ac99321c3547f (patch)
treec1e005ba65dc57ada896e27f446aa18c326e9bda /src/gui
parent01225e88d67d0bb5abb264fff2e2eddbb3d7c4bd (diff)
downloadmv-62651de51245ed7377bfdbf3212ac99321c3547f.tar.gz
mv-62651de51245ed7377bfdbf3212ac99321c3547f.tar.bz2
mv-62651de51245ed7377bfdbf3212ac99321c3547f.tar.xz
mv-62651de51245ed7377bfdbf3212ac99321c3547f.zip
Show id on unknown items.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itempopup.cpp11
-rw-r--r--src/gui/itempopup.h2
2 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index e09d0ce0a..5e50e2e55 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -100,7 +100,7 @@ void ItemPopup::setItem(const Item *item, bool showImage)
return;
const ItemInfo &ii = item->getInfo();
- setItem(ii, item->getColor(), showImage);
+ setItem(ii, item->getColor(), showImage, item->getId());
if (item->getRefine() > 0)
{
mLastName = ii.getName();
@@ -123,11 +123,14 @@ void ItemPopup::setItem(const Item *item, bool showImage)
}
void ItemPopup::setItem(const ItemInfo &item, unsigned char color,
- bool showImage)
+ bool showImage, int id)
{
if (!mIcon || (item.getName() == mLastName && color == mLastColor))
return;
+ if (id == -1)
+ id = item.getId();
+
int space = 0;
Image *oldImage = mIcon->getImage();
@@ -166,13 +169,13 @@ void ItemPopup::setItem(const ItemInfo &item, unsigned char color,
if (serverVersion > 0)
{
mItemName->setCaption(item.getName(color) + _(", ")
- + toString(item.getId()));
+ + toString(id));
mItemDesc->setTextWrapped(item.getDescription(color), 196);
}
else
{
mItemName->setCaption(item.getName() + _(", ")
- + toString(item.getId()));
+ + toString(id));
mItemDesc->setTextWrapped(item.getDescription(), 196);
}
diff --git a/src/gui/itempopup.h b/src/gui/itempopup.h
index 70664e022..66d7e91a2 100644
--- a/src/gui/itempopup.h
+++ b/src/gui/itempopup.h
@@ -53,7 +53,7 @@ class ItemPopup : public Popup
* Sets the info to be displayed given a particular item.
*/
void setItem(const ItemInfo &item, unsigned char color,
- bool showImage = false);
+ bool showImage = false, int id = -1);
void setItem(const Item *item, bool showImage = false);