summaryrefslogtreecommitdiff
path: root/src/gui/gui.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-14 00:41:48 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-14 00:41:48 +0000
commit06111415b117fc47b5b8bf6396d855616778f3b0 (patch)
tree54d21336701541b77750554e248b9a92dcba95c6 /src/gui/gui.h
parent4ecc89dcc6516b10c6dab8b79dcaa435ec9e1435 (diff)
downloadmana-06111415b117fc47b5b8bf6396d855616778f3b0.tar.gz
mana-06111415b117fc47b5b8bf6396d855616778f3b0.tar.bz2
mana-06111415b117fc47b5b8bf6396d855616778f3b0.tar.xz
mana-06111415b117fc47b5b8bf6396d855616778f3b0.zip
Committed resource manager cleanup patch by Doener, and properly implemented
the custom mouse cursor option, which is now also dynamically changeable through the setup window.
Diffstat (limited to 'src/gui/gui.h')
-rw-r--r--src/gui/gui.h37
1 files changed, 27 insertions, 10 deletions
diff --git a/src/gui/gui.h b/src/gui/gui.h
index dfd72ec7..02ea7caa 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -28,6 +28,7 @@
#include <guichan/sdl.hpp>
#include "windowcontainer.h"
#include "../graphics.h"
+#include "../configuration.h"
/**
* \defgroup GUI Core GUI related classes (widgets)
@@ -42,7 +43,7 @@
*
* \ingroup GUI
*/
-class Gui : public gcn::Gui, public gcn::MouseListener
+class Gui : public gcn::Gui, public gcn::MouseListener, ConfigListener
{
public:
/**
@@ -58,30 +59,46 @@ class Gui : public gcn::Gui, public gcn::MouseListener
/**
* Works around Guichan bug
*/
- void logic();
+ void
+ logic();
/**
* Draws the whole Gui by calling draw functions down in the
* Gui hierarchy. It also draws the mouse pointer.
*/
- void draw();
+ void
+ draw();
/**
* Handles mouse press on map.
*/
- void mousePress(int mx, int my, int button);
+ void
+ mousePress(int mx, int my, int button);
/**
* Return game font
*/
- gcn::ImageFont *getFont();
+ gcn::ImageFont*
+ getFont();
+
+ /**
+ * Sets whether a custom cursor should be rendered.
+ */
+ void
+ setUseCustomCursor(bool customCursor);
+
+ /**
+ * ConfigListener method.
+ */
+ void
+ optionChanged(const std::string &name);
private:
-#ifdef USE_OPENGL
- gcn::ImageLoader *hostImageLoader; /**< For loading images in GL */
-#endif
- gcn::ImageLoader *imageLoader; /**< For loading images */
- gcn::ImageFont *guiFont; /**< The global GUI font */
+ gcn::ImageLoader *mHostImageLoader; /**< For loading images in GL */
+ gcn::ImageLoader *mImageLoader; /**< For loading images */
+ gcn::ImageFont *mGuiFont; /**< The global GUI font */
+ Image *mMouseCursor; /**< Mouse cursor image */
+ bool mCustomCursor; /**< Show custom cursor */
};
extern Gui *gui; /**< The GUI system */