diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-05-17 15:48:23 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-05-17 15:48:23 +0200 |
commit | 2872eb224e9f3ec6947542f2d7ac0ad288574cf1 (patch) | |
tree | 718c571b7930afce9e909920366d0a052ddbf698 /gui.h | |
parent | e7e6a79f8bf2855b5d1d432613151e48d2d685da (diff) |
Added a console-like window which doesn't do anything interesting yet.
Diffstat (limited to 'gui.h')
-rw-r--r-- | gui.h | 32 |
1 files changed, 29 insertions, 3 deletions
@@ -6,18 +6,44 @@ #include <CEGUI.h> class GUI { + protected: + CEGUI::Window *wnd; + bool _showing; + public: static CEGUI::Window *root; virtual ~GUI() {}; static void init(); - virtual void render(); + static void pre_render(); + static void render(); + virtual void update() = 0; + virtual void show(); + virtual void hide(); + bool showing(); +}; + +class ConsoleWindow : public GUI { + private: + CEGUI::Window *editbox; + CEGUI::Listbox *listbox; + + bool clicked(const CEGUI::EventArgs& e); + bool keydown(const CEGUI::EventArgs& e); + + void erase_editbox_text(); + void handle_input(); + + public: + ConsoleWindow(); + virtual ~ConsoleWindow(); + + virtual void update(); }; class RaiseWindow : public GUI { private: - CEGUI::FrameWindow *wnd; CEGUI::PushButton *btn; CEGUI::Scrollbar *radius_sb; @@ -35,7 +61,7 @@ class RaiseWindow : public GUI { RaiseWindow(); virtual ~RaiseWindow(); - virtual void render(); + virtual void update(); float get_radius(); float get_focus(); float get_strength(); |