summaryrefslogtreecommitdiff
path: root/src/gui/itempopup.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-05 23:48:45 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-05 23:51:09 +0200
commit3c4661726f9321e91037291fcf628a54b993c4ec (patch)
treed2024fecd35a0f769a538bebdafd4aa5340f7b6a /src/gui/itempopup.cpp
parent5a9759680427154f379499cb3268f307bb860c22 (diff)
downloadmana-client-3c4661726f9321e91037291fcf628a54b993c4ec.tar.gz
mana-client-3c4661726f9321e91037291fcf628a54b993c4ec.tar.bz2
mana-client-3c4661726f9321e91037291fcf628a54b993c4ec.tar.xz
mana-client-3c4661726f9321e91037291fcf628a54b993c4ec.zip
Hide the item popup when the mouse moves on top of it
Makes the popup a lot less annoying. Still sticks around in some cases when it shouldn't, which seems to be because of missing mouseExited events from Guichan.
Diffstat (limited to 'src/gui/itempopup.cpp')
-rw-r--r--src/gui/itempopup.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index 2a45a06a..e1822e03 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -66,6 +66,8 @@ ItemPopup::ItemPopup():
add(mItemEffect);
add(mItemWeight);
+ addMouseListener(this);
+
loadPopupConfiguration();
}
@@ -178,3 +180,9 @@ void ItemPopup::view(int x, int y)
setVisible(true);
requestMoveToTop();
}
+
+void ItemPopup::mouseMoved(gcn::MouseEvent &event)
+{
+ // When the mouse moved on top of the popup, hide it
+ setVisible(false);
+}