summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.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/popupmenu.cpp
parent114559b98b7e8c94b1d84d4d450309fd16ed2a38 (diff)
downloadmana-088ccc74d9b8695c906eaabae8e4019ebf55c83c.tar.gz
mana-088ccc74d9b8695c906eaabae8e4019ebf55c83c.tar.bz2
mana-088ccc74d9b8695c906eaabae8e4019ebf55c83c.tar.xz
mana-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/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index a02a9eae..fde81cd8 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -25,6 +25,7 @@
#include <guichan/focushandler.hpp>
#include "browserbox.h"
+#include "chat.h"
#include "inventorywindow.h"
#include "item_amount.h"
#include "popupmenu.h"
@@ -248,6 +249,11 @@ void PopupMenu::handleLink(const std::string& link)
}
}
+ else if (link == "chat")
+ {
+ chatWindow->addItemText(mItem->getId(), mItem->getInfo().getName());
+ }
+
else if (link == "drop")
{
new ItemAmountWindow(AMOUNT_ITEM_DROP, inventoryWindow, mItem);
@@ -297,6 +303,7 @@ void PopupMenu::showPopup(int x, int y, Item *item)
mBrowserBox->addRow(_("@@use|Use@@"));
mBrowserBox->addRow(_("@@drop|Drop@@"));
+ mBrowserBox->addRow(_("@@chat|Add to Chat@@"));
mBrowserBox->addRow(_("@@description|Description@@"));
mBrowserBox->addRow("##3---");
mBrowserBox->addRow(_("@@cancel|Cancel@@"));