summaryrefslogtreecommitdiff
path: root/src/gui/gui.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-04 11:20:54 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-04 11:20:54 +0000
commiteccafb8d815068d908b998bb6c0b581b076dc78f (patch)
tree6967d3ca5fa1dc77b177c2f735469503ca04cd14 /src/gui/gui.h
parent061b9e817ffe73acca163510b276e6ca7dd8f6c2 (diff)
downloadmana-eccafb8d815068d908b998bb6c0b581b076dc78f.tar.gz
mana-eccafb8d815068d908b998bb6c0b581b076dc78f.tar.bz2
mana-eccafb8d815068d908b998bb6c0b581b076dc78f.tar.xz
mana-eccafb8d815068d908b998bb6c0b581b076dc78f.zip
Introduced a new class Viewport which combines the drawing code from Engine
with the (rather misplaced) input handling from the Gui class. Also, it's a Container itself which should allow for extending it to show Guichan widgets on map coordinates.
Diffstat (limited to 'src/gui/gui.h')
-rw-r--r--src/gui/gui.h52
1 files changed, 4 insertions, 48 deletions
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 0cb3f60b..caf27744 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -25,17 +25,13 @@
#define _TMW_GUI
#include <guichan/gui.hpp>
-#include <guichan/mouselistener.hpp>
#include "../guichanfwd.h"
-class Being;
-class FloorItem;
class GuiConfigListener;
class Graphics;
class Image;
-class Item;
-class PopupMenu;
+class Viewport;
/**
* \defgroup GUI Core GUI related classes (widgets)
@@ -50,7 +46,7 @@ class PopupMenu;
*
* \ingroup GUI
*/
-class Gui : public gcn::Gui, public gcn::MouseListener
+class Gui : public gcn::Gui
{
public:
/**
@@ -77,24 +73,6 @@ class Gui : public gcn::Gui, public gcn::MouseListener
draw();
/**
- * Handles mouse press on map.
- */
- void
- mousePress(int mx, int my, int button);
-
- /**
- * Handles mouse move on map
- */
- void
- mouseMotion(int mx, int my);
-
- /**
- * Handles mouse button release on map.
- */
- void
- mouseRelease(int mx, int my, int button);
-
- /**
* Return game font
*/
gcn::Font*
@@ -106,39 +84,17 @@ class Gui : public gcn::Gui, public gcn::MouseListener
void
setUseCustomCursor(bool customCursor);
- /**
- * Shows a popup for an item
- * TODO Find some way to get rid of Item here
- */
- void showPopup(int x, int y, Item *item);
-
- /**
- * Shows a popup for a floor item
- * TODO Find some way to get rid of FloorItem here
- */
- void showPopup(int x, int y, FloorItem *floorItem);
-
- /**
- * Shows a popup for a being
- * TODO Find some way to get rid of Being here
- */
- void showPopup(int x, int y, Being *being);
-
private:
GuiConfigListener *mConfigListener;
gcn::ImageLoader *mHostImageLoader; /**< For loading images in GL */
gcn::ImageLoader *mImageLoader; /**< For loading images */
- gcn::Font *mGuiFont; /**< The global GUI font */
+ gcn::Font *mGuiFont; /**< The global GUI font */
Image *mMouseCursor; /**< Mouse cursor image */
bool mCustomCursor; /**< Show custom cursor */
-
- PopupMenu *mPopup; /**< Popup window */
- bool mPopupActive;
- bool mPlayerFollowMouse;
- int mWalkTime;
};
extern Gui *gui; /**< The GUI system */
+extern Viewport *viewport; /**< The viewport */
extern gcn::SDLInput *guiInput; /**< GUI input */
/**