supertux
menu_storage.hpp
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 Menu;
23 
24 class MenuStorage final
25 {
26 private:
27  static MenuStorage* s_instance;
28 public:
29  static MenuStorage& instance();
30 
31 public:
32  enum MenuId {
33  NO_MENU,
34  MAIN_MENU,
35  OPTIONS_MENU,
36  INGAME_OPTIONS_MENU,
37  PROFILE_MENU,
38  WORLDSET_MENU,
39  CONTRIB_MENU,
40  CONTRIB_WORLD_MENU,
41  ADDON_MENU,
42  LANGPACK_MENU,
43  LANGPACK_AUTO_UPDATE_MENU,
44  LANGUAGE_MENU,
45  KEYBOARD_MENU,
46  JOYSTICK_MENU,
47  VIDEO_SYSTEM_MENU,
48  WORLDMAP_MENU,
49  WORLDMAP_CHEAT_MENU,
50  WORLDMAP_LEVEL_SELECT_MENU,
51  GAME_MENU,
52  CHEAT_MENU,
53  DEBUG_MENU,
54  EDITOR_LEVELSET_SELECT_MENU,
55  EDITOR_NEW_LEVELSET_MENU,
56  EDITOR_LEVEL_SELECT_MENU,
57  EDITOR_MENU,
58  EDITOR_TILEGROUP_MENU,
59  EDITOR_OBJECTGROUP_MENU,
60  EDITOR_SECTORS_MENU,
61  EDITOR_SECTOR_MENU,
62  EDITOR_LEVEL_MENU,
63  EDITOR_CONVERTERS_MENU,
64  PARTICLE_EDITOR_MENU,
65  PARTICLE_EDITOR_SAVE_AS,
66  PARTICLE_EDITOR_OPEN,
67  INTEGRATIONS_MENU,
68  ASSET_MENU,
69  CUSTOM_MENU_MENU,
70  MULTIPLAYER_MENU,
71  MULTIPLAYER_PLAYERS_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 */
Definition: menu_storage.hpp:24
Definition: menu.hpp:55