summaryrefslogtreecommitdiff
path: root/src/gui/itemcontainer.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2009-01-13 12:48:36 +0000
committerIra Rice <irarice@gmail.com>2009-01-20 10:54:07 -0700
commit088ccc74d9b8695c906eaabae8e4019ebf55c83c (patch)
tree8054c8531d721a7555b2c2b46c7b43adbad9b9d2 /src/gui/itemcontainer.cpp
parent114559b98b7e8c94b1d84d4d450309fd16ed2a38 (diff)
downloadmana-client-088ccc74d9b8695c906eaabae8e4019ebf55c83c.tar.gz
mana-client-088ccc74d9b8695c906eaabae8e4019ebf55c83c.tar.bz2
mana-client-088ccc74d9b8695c906eaabae8e4019ebf55c83c.tar.xz
mana-client-088ccc74d9b8695c906eaabae8e4019ebf55c83c.zip
Added WoW style item adding to chat window. Right click, then left
clicking on add to chat 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/itemcontainer.cpp')
-rw-r--r--src/gui/itemcontainer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index 7d9b3f70..78745158 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -164,7 +164,8 @@ void ItemContainer::selectNone()
void ItemContainer::refindSelectedItem()
{
- if (mSelectedItemIndex != NO_ITEM) {
+ if (mSelectedItemIndex != NO_ITEM)
+ {
if (mInventory->getItem(mSelectedItemIndex) &&
mInventory->getItem(mSelectedItemIndex)->getId() == mLastSelectedItemId)
@@ -175,7 +176,8 @@ void ItemContainer::refindSelectedItem()
for (int i = 0; i <= mMaxItems + 1; i++)
if (mInventory->getItem(i) &&
- mInventory->getItem(i)->getId() == mLastSelectedItemId) {
+ mInventory->getItem(i)->getId() == mLastSelectedItemId)
+ {
mSelectedItemIndex = i;
return;
}
@@ -248,12 +250,11 @@ void ItemContainer::mouseMoved(gcn::MouseEvent &event)
{
Item *item = mInventory->getItem( getSlotIndex(event.getX(), event.getY() ) );
- if( item )
+ if (item)
{
mItemPopup->setPosition(getParent()->getParent()->getX() +
getParent()->getParent()->getWidth(),
getParent()->getParent()->getY());
-
mItemPopup->setItem(item->getInfo());
mItemPopup->setOpaque(false);
mItemPopup->setVisible(true);
@@ -278,4 +279,3 @@ int ItemContainer::getSlotIndex(const int posX, const int posY) const
return (index);
}
-