Turned a lot of other global objects into Currentons
[supertux.git] / src / supertux / menu / menu_storage.cpp
index a0706ff..67b76da 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "supertux/globals.hpp"
 #include "supertux/menu/addon_menu.hpp"
+#include "supertux/menu/cheat_menu.hpp"
 #include "supertux/menu/contrib_menu.hpp"
 #include "supertux/menu/game_menu.hpp"
 #include "supertux/menu/joystick_menu.hpp"
@@ -27,6 +28,7 @@
 #include "supertux/menu/options_menu.hpp"
 #include "supertux/menu/profile_menu.hpp"
 #include "supertux/menu/worldmap_menu.hpp"
+#include "supertux/menu/worldmap_cheat_menu.hpp"
 
 MenuStorage* MenuStorage::s_instance = 0;
 
@@ -69,17 +71,23 @@ MenuStorage::create(MenuId menu_id)
       return std::unique_ptr<Menu>(new ProfileMenu);
 
     case KEYBOARD_MENU:
-      return std::unique_ptr<Menu>(new KeyboardMenu(g_input_manager));
+      return std::unique_ptr<Menu>(new KeyboardMenu(*InputManager::current()));
 
     case JOYSTICK_MENU:
-      return std::unique_ptr<Menu>(new JoystickMenu(g_input_manager));
+      return std::unique_ptr<Menu>(new JoystickMenu(*InputManager::current()));
 
     case WORLDMAP_MENU:
       return std::unique_ptr<Menu>(new WorldmapMenu);
 
+    case WORLDMAP_CHEAT_MENU:
+      return std::unique_ptr<Menu>(new WorldmapCheatMenu);
+
     case GAME_MENU:
       return std::unique_ptr<Menu>(new GameMenu);
 
+    case CHEAT_MENU:
+      return std::unique_ptr<Menu>(new CheatMenu);
+
     case CONTRIB_MENU:
       return std::unique_ptr<Menu>(new ContribMenu);