supertux
worldmap_cheat_menu.hpp
1 // SuperTux
2 // Copyright (C) 2014 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_WORLDMAP_CHEAT_MENU_HPP
18 #define HEADER_SUPERTUX_SUPERTUX_MENU_WORLDMAP_CHEAT_MENU_HPP
19 
20 #include "gui/menu.hpp"
21 
22 #include <functional>
23 
24 class PlayerStatus;
25 
26 class WorldmapCheatMenu final : public Menu
27 {
28 private:
29  enum MenuIDs {
30  MNID_GROW,
31  MNID_FIRE,
32  MNID_ICE,
33  MNID_AIR,
34  MNID_EARTH,
35  MNID_SHRINK,
36  MNID_GHOST,
37  MNID_FINISH_LEVEL,
38  MNID_RESET_LEVEL,
39  MNID_FINISH_WORLDMAP,
40  MNID_RESET_WORLDMAP,
41  MNID_MOVE_TO_LEVEL,
42  MNID_MOVE_TO_MAIN
43  };
44 
45 public:
47 
48  void menu_action(MenuItem& item) override;
49 
50 private:
51  void do_cheat(PlayerStatus& status, std::function<void(int)> callback);
52  void do_cheat(PlayerStatus& status, std::function<void(int, int)> callback);
53 
54 private:
55  WorldmapCheatMenu(const WorldmapCheatMenu&) = delete;
56  WorldmapCheatMenu& operator=(const WorldmapCheatMenu&) = delete;
57 };
58 
59 class WorldmapLevelSelectMenu final : public Menu
60 {
61 public:
63 
64  void menu_action(MenuItem& item) override;
65 
66 private:
68  WorldmapLevelSelectMenu& operator=(const WorldmapLevelSelectMenu&) = delete;
69 };
70 
71 #endif
72 
73 /* EOF */
This class keeps player status between different game sessions (for example when switching maps in th...
Definition: player_status.hpp:39
Definition: worldmap_cheat_menu.hpp:59
Definition: menu_item.hpp:23
Definition: worldmap_cheat_menu.hpp:26
Definition: menu.hpp:55