summaryrefslogtreecommitdiff
path: root/src/gui/gui.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-06 21:31:43 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-06 21:31:43 +0000
commitfef7a7fb89b529bb3695bbff14d964f4da49ab64 (patch)
treea5a3c3f43d81fa71d3437ad1ac3ab6385961b813 /src/gui/gui.h
parent16d1701920597d0a9636e30d57ebf399395233d9 (diff)
downloadmana-client-fef7a7fb89b529bb3695bbff14d964f4da49ab64.tar.gz
mana-client-fef7a7fb89b529bb3695bbff14d964f4da49ab64.tar.bz2
mana-client-fef7a7fb89b529bb3695bbff14d964f4da49ab64.tar.xz
mana-client-fef7a7fb89b529bb3695bbff14d964f4da49ab64.zip
Moved some GUI code into a class.
Diffstat (limited to 'src/gui/gui.h')
-rw-r--r--src/gui/gui.h35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/gui/gui.h b/src/gui/gui.h
index f1556898..ada04a55 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -37,6 +37,36 @@
* \defgroup GUI GUI related classes
*/
+/**
+ * Main GUI class.
+ *
+ * \ingroup GUI
+ */
+class Gui
+{
+ public:
+ /**
+ * Constructor.
+ */
+ Gui(BITMAP *screen);
+
+ /**
+ * Destructor.
+ */
+ virtual ~Gui();
+
+ /**
+ * Performs GUI logic and drawing.
+ */
+ void update();
+
+ private:
+ gcn::Gui* gui; /**< The GUI system */
+ gcn::Input* guiInput; /**< Input driver */
+ gcn::ImageLoader* imageLoader; /**< For loading images */
+ gcn::ImageFont* guiFont; /**< The global GUI font */
+};
+
typedef struct {
BITMAP *grid[9];
} LexSkinnedRect;
@@ -107,13 +137,14 @@ typedef struct {
extern LexSkin gui_skin;
extern BITMAP *gui_bitmap;
+extern Gui* gui;
extern gcn::Container* guiTop; // The top container
extern gcn::AllegroGraphics* guiGraphics; // Graphics driver
-extern gcn::ImageFont* guiFont; // The gui font
+/** Initialize gui system */
void init_gui(BITMAP *dest_bitmap, const char *skin);
+
void gui_exit();
-int gui_update(DIALOG_PLAYER *player);
int gui_load_skin(const char* skinname);
void gui_shutdown(void);