summaryrefslogtreecommitdiff
path: root/src/gui/gui.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-05 23:01:54 +0100
committerIra Rice <irarice@gmail.com>2008-12-05 15:55:53 -0700
commit1777c9b48e93e6c5a7aaf5101397566ad61789e1 (patch)
tree7486d59200ac7826fac8f84bd590efb752e0367b /src/gui/gui.h
parent032f7659014d265a3c34765da2f277b7b0f32691 (diff)
downloadmana-client-1777c9b48e93e6c5a7aaf5101397566ad61789e1.tar.gz
mana-client-1777c9b48e93e6c5a7aaf5101397566ad61789e1.tar.bz2
mana-client-1777c9b48e93e6c5a7aaf5101397566ad61789e1.tar.xz
mana-client-1777c9b48e93e6c5a7aaf5101397566ad61789e1.zip
Fade out mouse cursor when not used for some time
The mouse cursor will now disappear when not used for 15 seconds. When using OpenGL it will even fade. Requested by doorsman.
Diffstat (limited to 'src/gui/gui.h')
-rw-r--r--src/gui/gui.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 8cf91915..f56b1dbf 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -58,6 +58,12 @@ class Gui : public gcn::Gui
~Gui();
/**
+ * Performs logic of the GUI. Overridden to track mouse pointer
+ * activity.
+ */
+ void logic();
+
+ /**
* Draws the whole Gui by calling draw functions down in the
* Gui hierarchy. It also draws the mouse pointer.
*/
@@ -94,11 +100,16 @@ class Gui : public gcn::Gui
CURSOR_TOTAL
};
+ protected:
+ void handleMouseMoved(const gcn::MouseInput &mouseInput);
+
private:
GuiConfigListener *mConfigListener;
gcn::Font *mGuiFont; /**< The global GUI font */
bool mCustomCursor; /**< Show custom cursor */
ImageSet *mMouseCursors; /**< Mouse cursor images */
+ float mMouseCursorAlpha;
+ int mMouseInactivityTimer;
int mCursorType;
};