multiplayer_menu.cpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // SuperTux
  2. // Copyright (C) 2021 A. Semphris <semphris@protonmail.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. #include "supertux/menu/multiplayer_menu.hpp"
  17. #include "gui/item_toggle.hpp"
  18. #include "supertux/gameconfig.hpp"
  19. #include "supertux/globals.hpp"
  20. #include "supertux/menu/menu_storage.hpp"
  21. #include "util/gettext.hpp"
  22. MultiplayerMenu::MultiplayerMenu()
  23. {
  24. add_label(_("Multiplayer"));
  25. add_hl();
  26. add_toggle(-1, _("Auto-manage Players"), &g_config->multiplayer_auto_manage_players)
  27. .set_help(_("Automatically add and remove players when controllers are plugged or unplugged"));
  28. add_toggle(-2, _("Allow Multibind"), &g_config->multiplayer_multibind)
  29. .set_help(_("Allow binding multiple joysticks to a single player"));
  30. add_submenu(_("Manage Players"), MenuStorage::MULTIPLAYER_PLAYERS_MENU);
  31. add_hl();
  32. add_back(_("Back"));
  33. }
  34. /* EOF */