summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/inventorywindow.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 9c8e860c..c6b93723 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -251,9 +251,16 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
if (event.getSource() == mItems && item && isDoubleClick(item->getInvIndex()))
{
-
if (isMainInventory() && item->getInfo().getActivatable())
- action(gcn::ActionEvent(mUseButton, mUseButton->getActionEventId()));
+ {
+ action(gcn::ActionEvent(mUseButton,
+ mUseButton->getActionEventId()));
+ }
+ else if (isMainInventory() && item->getInfo().getEquippable())
+ {
+ action(gcn::ActionEvent(mEquipButton,
+ mEquipButton->getActionEventId()));
+ }
}
if (event.getButton() == gcn::MouseEvent::RIGHT)