1 // SuperTux 2 // Copyright (C) 2009 Ingo Ruhnke <grumbel@gmail.com> 3 // 4 // This program is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // This program is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with this program. If not, see <http://www.gnu.org/licenses/>. 16 17 #ifndef HEADER_SUPERTUX_SUPERTUX_MENU_MENU_STORAGE_HPP 18 #define HEADER_SUPERTUX_SUPERTUX_MENU_MENU_STORAGE_HPP 19 20 #include <memory> 21 22 class JoystickMenu; 23 class KeyboardMenu; 24 class Menu; 25 class OptionsMenu; 26 class ProfileMenu; 27 28 class MenuStorage final 29 { 30 private: 31 static MenuStorage* s_instance; 32 public: 33 static MenuStorage& instance(); 34 35 public: 36 enum MenuId { 37 NO_MENU, 38 MAIN_MENU, 39 OPTIONS_MENU, 40 INGAME_OPTIONS_MENU, 41 PROFILE_MENU, 42 WORLDSET_MENU, 43 CONTRIB_MENU, 44 CONTRIB_WORLD_MENU, 45 ADDON_MENU, 46 LANGPACK_MENU, 47 LANGPACK_AUTO_UPDATE_MENU, 48 LANGUAGE_MENU, 49 KEYBOARD_MENU, 50 JOYSTICK_MENU, 51 WORLDMAP_MENU, 52 WORLDMAP_CHEAT_MENU, 53 WORLDMAP_LEVEL_SELECT_MENU, 54 GAME_MENU, 55 CHEAT_MENU, 56 DEBUG_MENU, 57 EDITOR_LEVELSET_SELECT_MENU, 58 EDITOR_NEW_LEVELSET_MENU, 59 EDITOR_LEVEL_SELECT_MENU, 60 EDITOR_MENU, 61 EDITOR_TILEGROUP_MENU, 62 EDITOR_OBJECTGROUP_MENU, 63 EDITOR_SECTORS_MENU, 64 EDITOR_SECTOR_MENU, 65 EDITOR_LEVEL_MENU, 66 EDITOR_LEVELSET_MENU, 67 PARTICLE_EDITOR_MENU, 68 PARTICLE_EDITOR_SAVE_AS, 69 PARTICLE_EDITOR_OPEN, 70 INTEGRATIONS_MENU, 71 ASSET_MENU 72 }; 73 74 public: 75 MenuStorage(); 76 ~MenuStorage(); 77 78 std::unique_ptr<Menu> create(MenuId menu_id); 79 80 private: 81 MenuStorage(const MenuStorage&) = delete; 82 MenuStorage& operator=(const MenuStorage&) = delete; 83 }; 84 85 #endif 86 87 /* EOF */ 88