diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-04-15 00:10:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-04-15 00:10:31 +0300 |
commit | 62651de51245ed7377bfdbf3212ac99321c3547f (patch) | |
tree | c1e005ba65dc57ada896e27f446aa18c326e9bda /src/gui/itempopup.cpp | |
parent | 01225e88d67d0bb5abb264fff2e2eddbb3d7c4bd (diff) | |
download | mv-62651de51245ed7377bfdbf3212ac99321c3547f.tar.gz mv-62651de51245ed7377bfdbf3212ac99321c3547f.tar.bz2 mv-62651de51245ed7377bfdbf3212ac99321c3547f.tar.xz mv-62651de51245ed7377bfdbf3212ac99321c3547f.zip |
Show id on unknown items.
Diffstat (limited to 'src/gui/itempopup.cpp')
-rw-r--r-- | src/gui/itempopup.cpp | 11 |
1 files changed, 7 insertions, 4 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); } |