GlobalLobbyRoomWindow.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * GlobalLobbyRoomWindow.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "../windows/CWindowObject.h"
  12. #include "../../lib/modding/ModVerificationInfo.h"
  13. class CLabel;
  14. class CTextBox;
  15. class FilledTexturePlayerColored;
  16. class CButton;
  17. class CToggleGroup;
  18. class GlobalLobbyWindow;
  19. class TransparentFilledRectangle;
  20. class CListBox;
  21. struct GlobalLobbyAccount;
  22. struct GlobalLobbyRoom;
  23. struct ModVerificationInfo;
  24. struct GlobalLobbyRoomModInfo
  25. {
  26. std::string modName;
  27. std::string version;
  28. ModVerificationStatus status;
  29. };
  30. class GlobalLobbyRoomAccountCard : public CIntObject
  31. {
  32. std::shared_ptr<TransparentFilledRectangle> backgroundOverlay;
  33. std::shared_ptr<CLabel> labelName;
  34. std::shared_ptr<CLabel> labelStatus;
  35. public:
  36. GlobalLobbyRoomAccountCard(const GlobalLobbyAccount & accountDescription);
  37. };
  38. class GlobalLobbyRoomModCard : public CIntObject
  39. {
  40. std::shared_ptr<TransparentFilledRectangle> backgroundOverlay;
  41. std::shared_ptr<CLabel> labelName;
  42. std::shared_ptr<CLabel> labelStatus;
  43. std::shared_ptr<CLabel> labelVersion;
  44. public:
  45. GlobalLobbyRoomModCard(const GlobalLobbyRoomModInfo & modInfo);
  46. };
  47. class GlobalLobbyRoomWindow : public CWindowObject
  48. {
  49. std::vector<GlobalLobbyRoomModInfo> modVerificationList;
  50. GlobalLobbyWindow * window;
  51. std::string roomUUID;
  52. std::shared_ptr<FilledTexturePlayerColored> filledBackground;
  53. std::shared_ptr<CLabel> labelTitle;
  54. std::shared_ptr<CLabel> labelSubtitle;
  55. std::shared_ptr<CLabel> labelDescription;
  56. std::shared_ptr<CLabel> labelVersion;
  57. std::shared_ptr<CLabel> labelJoinStatus;
  58. std::shared_ptr<CLabel> accountListTitle;
  59. std::shared_ptr<CLabel> modListTitle;
  60. std::shared_ptr<TransparentFilledRectangle> accountListBackground;
  61. std::shared_ptr<TransparentFilledRectangle> modListBackground;
  62. std::shared_ptr<CListBox> accountList;
  63. std::shared_ptr<CListBox> modList;
  64. std::shared_ptr<CButton> buttonJoin;
  65. std::shared_ptr<CButton> buttonClose;
  66. void onJoin();
  67. void onClose();
  68. public:
  69. GlobalLobbyRoomWindow(GlobalLobbyWindow * window, const std::string & roomUUID);
  70. };