From 3c4661726f9321e91037291fcf628a54b993c4ec Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 5 May 2009 23:48:45 +0200 Subject: 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. --- src/gui/itempopup.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gui/itempopup.cpp') 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); +} -- cgit v1.2.3-60-g2f50