diff options
author | Weblate <42@minetest.ru> | 2013-05-13 18:19:51 +0200 |
---|---|---|
committer | Weblate <42@minetest.ru> | 2013-05-13 18:19:51 +0200 |
commit | e0564d5de01dd26f7b4f4d188415f5cf5a47b5d0 (patch) | |
tree | 79a5a18634069822b84b9c878d8d26742567c4a3 /src/guiCreateWorld.cpp | |
parent | be96fa2fb884fca571b92f63d33e0c5a592a2aad (diff) | |
parent | 822723c2468ea763cdef447218059a5586e8e033 (diff) | |
download | minetest-e0564d5de01dd26f7b4f4d188415f5cf5a47b5d0.tar.gz minetest-e0564d5de01dd26f7b4f4d188415f5cf5a47b5d0.tar.bz2 minetest-e0564d5de01dd26f7b4f4d188415f5cf5a47b5d0.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/guiCreateWorld.cpp')
-rw-r--r-- | src/guiCreateWorld.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/guiCreateWorld.cpp b/src/guiCreateWorld.cpp index 09b18fb3c..caa884bc0 100644 --- a/src/guiCreateWorld.cpp +++ b/src/guiCreateWorld.cpp @@ -42,13 +42,22 @@ GUICreateWorld::GUICreateWorld(gui::IGUIEnvironment* env, gui::IGUIElement* parent, s32 id, IMenuManager *menumgr, CreateWorldDest *dest, - const std::vector<SubgameSpec> &games + const std::vector<SubgameSpec> &games, + const std::string &initial_game ): GUIModalMenu(env, parent, id, menumgr), m_dest(dest), - m_games(games) + m_games(games), + m_initial_game_i(0) { assert(games.size() > 0); + + for(size_t i=0; i<games.size(); i++){ + if(games[i].id == initial_game){ + m_initial_game_i = i; + break; + } + } } GUICreateWorld::~GUICreateWorld() @@ -151,7 +160,7 @@ void GUICreateWorld::regenerateGui(v2u32 screensize) os<<L"]"; e->addItem(os.str().c_str()); } - e->setSelected(0); + e->setSelected(m_initial_game_i); } changeCtype(""); { |