From 2cf76f6f1b1c915ad198315b301221c28391265d Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Thu, 2 May 2013 19:07:44 +0300 Subject: Pre-select current game in world creation dialog --- src/guiCreateWorld.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/guiCreateWorld.cpp') 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 &games + const std::vector &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; iaddItem(os.str().c_str()); } - e->setSelected(0); + e->setSelected(m_initial_game_i); } changeCtype(""); { -- cgit v1.2.3