supertux
profile_menu.hpp
1 // SuperTux
2 // Copyright (C) 2008 Ingo Ruhnke <grumbel@gmail.com>
3 // 2022 Vankata453
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18 #ifndef HEADER_SUPERTUX_SUPERTUX_MENU_PROFILE_MENU_HPP
19 #define HEADER_SUPERTUX_SUPERTUX_MENU_PROFILE_MENU_HPP
20 
21 #include "gui/menu.hpp"
22 
23 class Profile;
24 
25 class ProfileMenu final : public Menu
26 {
27 public:
28  ProfileMenu();
29 
30  void refresh() override;
31  void menu_action(MenuItem& item) override;
32 
33 private:
34  void rebuild_menu();
35 
36  void on_profile_change();
37 
38 private:
39  std::vector<Profile*> m_profiles;
40  Profile* m_current_profile;
41 
42 private:
43  ProfileMenu(const ProfileMenu&) = delete;
44  ProfileMenu& operator=(const ProfileMenu&) = delete;
45 };
46 
47 #endif
48 
49 /* EOF */
Definition: menu_item.hpp:23
Definition: menu.hpp:55
Definition: profile_menu.hpp:25
void refresh() override
Perform actions to bring the menu up to date with configuration changes.
Definition: profile_menu.cpp:43
Contains general data about a profile, which preserves savegames.
Definition: profile.hpp:26