- std::vector<WorldSpec> worlds;
- std::vector<SubgameSpec> games;
- std::vector<ServerListSpec> servers;
-
- MainMenuData():
- // Generic
- selected_tab(0),
- // Client opts
- fancy_trees(false),
- smooth_lighting(false),
- // Server opts
- creative_mode(false),
- enable_damage(false),
- enable_public(false),
- selected_world(0),
- simple_singleplayer_mode(false),
- // Actions
- only_refresh(false),
-
- serverlist_show_available(false)
- {}
-};
-
-class GUIMainMenu : public GUIModalMenu
-{
-public:
- GUIMainMenu(gui::IGUIEnvironment* env,
- gui::IGUIElement* parent, s32 id,
- IMenuManager *menumgr,
- MainMenuData *data,
- IGameCallback *gamecallback);
- ~GUIMainMenu();
-
- void removeChildren();
- // Remove and re-add (or reposition) stuff
- void regenerateGui(v2u32 screensize);
- void drawMenu();
- void readInput(MainMenuData *dst);
- void acceptInput();
- bool getStatus()
- { return m_accepted; }
- bool OnEvent(const SEvent& event);
- void createNewWorld(std::wstring name, std::string gameid);
- void deleteWorld(const std::vector<std::string> &paths);
- int getTab();
- void displayMessageMenu(std::wstring msg);
-
-private:
- MainMenuData *m_data;
- bool m_accepted;
- IGameCallback *m_gamecallback;