summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 80533025..ffff6b1a 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -25,6 +25,7 @@
#include "item.h"
#include "localplayer.h"
#include "units.h"
+#include "keyboardconfig.h"
#include "gui/itemamount.h"
#include "gui/setup.h"
@@ -221,6 +222,19 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
const int my = event.getY() + getY();
viewport->showPopup(mx, my, item);
}
+
+ if (event.getButton() == gcn::MouseEvent::LEFT)
+ {
+ if (storageWindow && keyboard.isKeyActive(keyboard.KEY_EMOTE))
+ {
+ Item *item = mItems->getSelectedItem();
+
+ if(!item)
+ return;
+
+ storageWindow->addStore(item, item->getQuantity());
+ }
+ }
}
void InventoryWindow::keyPressed(gcn::KeyEvent &event)