diff options
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(); |