]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/guiMainMenu.h
Fix click areas of singleplayer checkboxes
[dragonfireclient.git] / src / guiMainMenu.h
index 08c585b88b038d870c2808888cf438b7794fd0b0..5f9e73f62a113c5fe0a1c492fdcc8cdf871135d5 100644 (file)
@@ -30,6 +30,8 @@ class IGameCallback;
 struct MainMenuData
 {
        // These are in the native format of the gui elements
+       // Generic
+       int selected_tab;
        // Client options
        std::wstring address;
        std::wstring port;
@@ -43,15 +45,18 @@ struct MainMenuData
        bool creative_mode;
        bool enable_damage;
        int selected_world;
+       bool simple_singleplayer_mode;
        // Actions
-       bool delete_world;
+       WorldSpec delete_world_spec;
        std::wstring create_world_name;
        std::string create_world_gameid;
 
-       std::list<std::wstring> worlds;
+       std::vector<WorldSpec> worlds;
        std::vector<SubgameSpec> games;
 
        MainMenuData():
+               // Generic
+               selected_tab(0),
                // Client opts
                fancy_trees(false),
                smooth_lighting(false),
@@ -59,8 +64,7 @@ struct MainMenuData
                creative_mode(false),
                enable_damage(false),
                selected_world(0),
-               // Actions
-               delete_world(false)
+               simple_singleplayer_mode(false)
        {}
 };
 
@@ -84,6 +88,8 @@ class GUIMainMenu : public GUIModalMenu
        { return m_accepted; }
        bool OnEvent(const SEvent& event);
        void createNewWorld(std::wstring name, std::string gameid);
+       void deleteWorld(WorldSpec spec);
+       int getTab();
        
 private:
        MainMenuData *m_data;
@@ -94,6 +100,12 @@ class GUIMainMenu : public GUIModalMenu
        gui::IGUIElement* parent;
        s32 id;
        IMenuManager *menumgr;
+       
+       bool m_is_regenerating;
+       v2s32 m_topleft_client;
+       v2s32 m_size_client;
+       v2s32 m_topleft_server;
+       v2s32 m_size_server;
 };
 
 #endif