diff options
Diffstat (limited to 'src/guiMainMenu.cpp')
-rw-r--r-- | src/guiMainMenu.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/guiMainMenu.cpp b/src/guiMainMenu.cpp index ca0c1317c..77a5a85b8 100644 --- a/src/guiMainMenu.cpp +++ b/src/guiMainMenu.cpp @@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "guiMainMenu.h" #include "guiKeyChangeMenu.h" #include "guiCreateWorld.h" +#include "guiConfigureWorld.h" #include "guiMessageMenu.h" #include "guiConfirmMenu.h" #include "debug.h" @@ -1033,11 +1034,22 @@ bool GUIMainMenu::OnEvent(const SEvent& event) return true; } case GUI_ID_CONFIGURE_WORLD_BUTTON: { - GUIMessageMenu *menu = new GUIMessageMenu(env, parent, - -1, menumgr, - wgettext("Nothing here")); - menu->drop(); - return true; + MainMenuData cur; + readInput(&cur); + if(cur.selected_world == -1) + { + (new GUIMessageMenu(env, parent, -1, menumgr, + wgettext("Cannot configure world: Nothing selected")) + )->drop(); + } + else + { + WorldSpec wspec = m_data->worlds[cur.selected_world]; + GUIConfigureWorld *menu = new GUIConfigureWorld(env, parent, + -1, menumgr, wspec); + menu->drop(); + return true; + } } case GUI_ID_SERVERLIST_DELETE: { gui::IGUIListBox *serverlist = (gui::IGUIListBox*)getElementFromId(GUI_ID_SERVERLIST); |