profile_menu.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. #ifndef HEADER_SUPERTUX_SUPERTUX_MENU_PROFILE_MENU_HPP
  18. #define HEADER_SUPERTUX_SUPERTUX_MENU_PROFILE_MENU_HPP
  19. #include "gui/menu.hpp"
  20. class Profile;
  21. class ProfileMenu final : public Menu
  22. {
  23. public:
  24. ProfileMenu();
  25. void refresh() override;
  26. void menu_action(MenuItem& item) override;
  27. private:
  28. void rebuild_menu();
  29. void on_profile_change();
  30. private:
  31. std::vector<Profile*> m_profiles;
  32. Profile* m_current_profile;
  33. private:
  34. ProfileMenu(const ProfileMenu&) = delete;
  35. ProfileMenu& operator=(const ProfileMenu&) = delete;
  36. };
  37. #endif
  38. /* EOF */