summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAngelo Castellani <udp.castellani@gmail.com>2011-05-22 19:07:41 -0400
committerStefan Dombrowski <stefan@uni-bonn.de>2011-05-25 19:34:25 +0200
commitb02081c00450d274c23b7198620ee7748756bd72 (patch)
treeaadc24f7ce866f916fb24b940eaf1f1db8ea8e88 /src/gui/widgets
parent6d9936d160b197fe68c5bb21972b197fb1b64ba4 (diff)
downloadmana-b02081c00450d274c23b7198620ee7748756bd72.tar.gz
mana-b02081c00450d274c23b7198620ee7748756bd72.tar.bz2
mana-b02081c00450d274c23b7198620ee7748756bd72.tar.xz
mana-b02081c00450d274c23b7198620ee7748756bd72.zip
Added more double clickable actions
- double clicking a do_choice item submits it - double clicking the npc chat will hit 'next' - double click to buy/sell a single item - clicking on no item in the inventory now deselects - double click to use/activate items in inventory
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/itemcontainer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 0967055b..2cd0fa23 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -278,12 +278,19 @@ void ItemContainer::mousePressed(gcn::MouseEvent &event)
{
const int index = getSlotIndex(event.getX(), event.getY());
if (index == Inventory::NO_SLOT_INDEX)
+ {
+ mSelectionStatus = SEL_DESELECTING;
return;
+ }
Item *item = getItemAt(index);
if (!item)
+ {
+ mSelectionStatus = SEL_DESELECTING;
return;
+ }
+
// put item name into chat window
if (mDescItems)
@@ -293,7 +300,6 @@ void ItemContainer::mousePressed(gcn::MouseEvent &event)
if (mSelectedIndex == index)
{
- mSelectionStatus = SEL_DESELECTING;
}
else if (item && item->getId())
{