summaryrefslogtreecommitdiff
path: root/src/gui/itempopup.h
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.h
parent5a9759680427154f379499cb3268f307bb860c22 (diff)
downloadmana-3c4661726f9321e91037291fcf628a54b993c4ec.tar.gz
mana-3c4661726f9321e91037291fcf628a54b993c4ec.tar.bz2
mana-3c4661726f9321e91037291fcf628a54b993c4ec.tar.xz
mana-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.h')
-rw-r--r--src/gui/itempopup.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/itempopup.h b/src/gui/itempopup.h
index 6140e4dd..e4bef371 100644
--- a/src/gui/itempopup.h
+++ b/src/gui/itempopup.h
@@ -27,12 +27,15 @@
#include "resources/iteminfo.h"
+#include <guichan/mouselistener.hpp>
+
class TextBox;
/**
* A popup that displays information about an item.
*/
-class ItemPopup : public Popup
+class ItemPopup : public Popup,
+ public gcn::MouseListener
{
public:
/**
@@ -55,6 +58,8 @@ class ItemPopup : public Popup
*/
void view(int x, int y);
+ void mouseMoved(gcn::MouseEvent &mouseEvent);
+
private:
gcn::Label *mItemName;
TextBox *mItemDesc;