Moved menu code frome GameSession and Worldmap into the proper Menu::check_menu(...
[supertux.git] / src / worldmap / worldmap.cpp
index b974db8..f21f854 100644 (file)
@@ -570,19 +570,9 @@ WorldMap::update(float delta)
 {
   if(!in_level) {
     Menu* menu = MenuManager::instance().current();
-    if(menu != NULL) {
-      if(menu == worldmap_menu.get()) {
-        switch (worldmap_menu->check())
-        {
-          case MNID_RETURNWORLDMAP: // Return to game
-            MenuManager::instance().set_current(0);
-            break;
-          case MNID_QUITWORLDMAP: // Quit Worldmap
-            g_screen_manager->exit_screen();
-            break;
-        }
-      }
-
+    if (menu && menu == worldmap_menu.get())
+    {
+      menu->check_menu();
       return;
     }