diff options
author | David Athay <ko2fan@gmail.com> | 2009-01-13 12:48:36 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2009-01-13 12:48:36 +0000 |
commit | db37dcd73f3116917584e81a474f70e0d0786bc4 (patch) | |
tree | e1b03485652de7a129f6c9277a973e1d468b7a16 /src/gui/itempopup.cpp | |
parent | 8d6cc0162fec250743e6491fb4b1e2f07c7657c2 (diff) | |
download | mana-db37dcd73f3116917584e81a474f70e0d0786bc4.tar.gz mana-db37dcd73f3116917584e81a474f70e0d0786bc4.tar.bz2 mana-db37dcd73f3116917584e81a474f70e0d0786bc4.tar.xz mana-db37dcd73f3116917584e81a474f70e0d0786bc4.zip |
Added WoW style item adding to chat window. Right Ctrl and Left click to put the item in the chat input. Left click the item link to show a popup description, and click the link again to remove the popup.
Diffstat (limited to 'src/gui/itempopup.cpp')
-rw-r--r-- | src/gui/itempopup.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp index ee58c5cd..7a662151 100644 --- a/src/gui/itempopup.cpp +++ b/src/gui/itempopup.cpp @@ -81,19 +81,16 @@ ItemPopup::ItemPopup() mItemEffect->setTextWrapped( "" ); } -void ItemPopup::setItem(Item *item) +void ItemPopup::setItem(const ItemInfo &item) { - - ItemInfo const *info = item ? &item->getInfo() : NULL; - - mItemName->setCaption(info->getName()); - mItemDesc->setTextWrapped( info->getDescription() ); - mItemEffect->setTextWrapped( info->getEffect() ); + mItemName->setCaption(item.getName()); + mItemDesc->setTextWrapped(item.getDescription()); + mItemEffect->setTextWrapped(item.getEffect()); int numRowsDesc = mItemDesc->getNumberOfRows(); int numRowsEffect = mItemEffect->getNumberOfRows(); - if(info->getEffect() == "") + if(item.getEffect() == "") { setContentSize(200, (numRowsDesc * 14) + 30); } else { |