Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/mainmenu.h')
-rw-r--r--src/client/mainmenu.h54
1 files changed, 46 insertions, 8 deletions
diff --git a/src/client/mainmenu.h b/src/client/mainmenu.h
index 9320668..0a0354c 100644
--- a/src/client/mainmenu.h
+++ b/src/client/mainmenu.h
@@ -27,27 +27,65 @@ public:
virtual void show();
virtual void hide();
+
+ /**
+ * @brief show the main or game menu, depending on the application state
+ * */
+ void show_default();
+
+ /// show a submenu
+ void show_menu(const char * label);
+
+ inline void show_menu(const std::string & label) {
+ show_menu(label.c_str());
+ }
+
+ /// load menu definitions
+ void load();
+
protected:
+
+ virtual void draw();
+
virtual void draw_background();
virtual void resize();
-
+
+ virtual bool on_keypress(const int key, const unsigned int modifier);
+
private:
+ /// load menu definitions
+ void load_definitions();
+
+ /// show the main, game or join menu
+ void show_menu();
+
+ void show_menu(const Widget *widget);
+
+ /// the current active menu
+ ui::Widget *mainmenu_activemenu;
+
/// the menu to show if the application is not connected
- ui::Window *mainmenu_mainmenu;
+ ui::Widget *mainmenu_mainmenu;
+
/// the menu to show if the application is connected but the player has not joined yet
- ui::Window *mainmenu_joinmenu;
+ ui::Widget *mainmenu_joinmenu;
+
/// the menu the show if the application is connected and the player has joined
- ui::Window *mainmenu_gamemenu;
+ ui::Widget *mainmenu_gamemenu;
+
/// the options menu
- ui::Window *mainmenu_optionsmenu;
+ ui::Widget *mainmenu_optionsmenu;
+
/// the load game menu
- ui::Window *mainmenu_loadmenu;
+ ui::Widget *mainmenu_loadmenu;
+
/// the save game menu
- ui::Window *mainmenu_savemenu;
+ ui::Widget *mainmenu_savemenu;
+
/// the connect to server menu
- ui::Window *mainmenu_connectmenu;
+ ui::Widget *mainmenu_connectmenu;
std::string mainmenu_background;
};