guiMainMenu.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. Minetest
  3. Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU Lesser General Public License as published by
  6. the Free Software Foundation; either version 2.1 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public License along
  13. with this program; if not, write to the Free Software Foundation, Inc.,
  14. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  15. */
  16. #pragma once
  17. #include "irrlichttypes_extrabloated.h"
  18. #include "gameparams.h"
  19. #include <string>
  20. #include <list>
  21. struct MainMenuDataForScript {
  22. MainMenuDataForScript() = default;
  23. // Whether the server has requested a reconnect
  24. bool reconnect_requested = false;
  25. std::string errormessage = "";
  26. };
  27. struct MainMenuData {
  28. // Client options
  29. std::string servername;
  30. std::string serverdescription;
  31. std::string address;
  32. std::string port;
  33. std::string name;
  34. std::string password;
  35. // Whether to reconnect
  36. bool do_reconnect = false;
  37. // Server options
  38. int selected_world = 0;
  39. bool simple_singleplayer_mode = false;
  40. // Data to be passed to the script
  41. MainMenuDataForScript script_data;
  42. ELoginRegister allow_login_or_register = ELoginRegister::Any;
  43. MainMenuData() = default;
  44. };