1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add confirmation menu and make world deletion possible in GUI

This commit is contained in:
Perttu Ahola 2012-03-13 00:48:02 +02:00
parent 591527d878
commit 64232f0aec
6 changed files with 304 additions and 30 deletions

View file

@ -44,11 +44,11 @@ struct MainMenuData
bool enable_damage;
int selected_world;
// 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():
@ -58,9 +58,7 @@ struct MainMenuData
// Server opts
creative_mode(false),
enable_damage(false),
selected_world(0),
// Actions
delete_world(false)
selected_world(0)
{}
};
@ -84,6 +82,7 @@ public:
{ return m_accepted; }
bool OnEvent(const SEvent& event);
void createNewWorld(std::wstring name, std::string gameid);
void deleteWorld(WorldSpec spec);
private:
MainMenuData *m_data;