GlobalLobbyRoomWindow.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. VCMI_LIB_NAMESPACE_BEGIN
  24. struct ModVerificationInfo;
  25. VCMI_LIB_NAMESPACE_END
  26. struct GlobalLobbyRoomModInfo
  27. {
  28. std::string modName;
  29. std::string version;
  30. ModVerificationStatus status;
  31. };
  32. class GlobalLobbyRoomAccountCard : public CIntObject
  33. {
  34. std::shared_ptr<TransparentFilledRectangle> backgroundOverlay;
  35. std::shared_ptr<CLabel> labelName;
  36. std::shared_ptr<CLabel> labelStatus;
  37. public:
  38. GlobalLobbyRoomAccountCard(const GlobalLobbyAccount & accountDescription);
  39. };
  40. class GlobalLobbyRoomModCard : public CIntObject
  41. {
  42. std::shared_ptr<TransparentFilledRectangle> backgroundOverlay;
  43. std::shared_ptr<CLabel> labelName;
  44. std::shared_ptr<CLabel> labelStatus;
  45. std::shared_ptr<CLabel> labelVersion;
  46. public:
  47. GlobalLobbyRoomModCard(const GlobalLobbyRoomModInfo & modInfo);
  48. };
  49. class GlobalLobbyRoomWindow : public CWindowObject
  50. {
  51. std::vector<GlobalLobbyRoomModInfo> modVerificationList;
  52. GlobalLobbyWindow * window;
  53. std::string roomUUID;
  54. std::shared_ptr<FilledTexturePlayerColored> filledBackground;
  55. std::shared_ptr<CLabel> labelTitle;
  56. std::shared_ptr<CLabel> labelSubtitle;
  57. std::shared_ptr<CLabel> labelVersionTitle;
  58. std::shared_ptr<CLabel> labelVersionValue;
  59. std::shared_ptr<CTextBox> labelJoinStatus;
  60. std::shared_ptr<CLabel> accountListTitle;
  61. std::shared_ptr<CLabel> modListTitle;
  62. std::shared_ptr<TransparentFilledRectangle> accountListBackground;
  63. std::shared_ptr<TransparentFilledRectangle> modListBackground;
  64. std::shared_ptr<CListBox> accountList;
  65. std::shared_ptr<CListBox> modList;
  66. std::shared_ptr<CButton> buttonJoin;
  67. std::shared_ptr<CButton> buttonClose;
  68. void onJoin();
  69. void onClose();
  70. public:
  71. GlobalLobbyRoomWindow(GlobalLobbyWindow * window, const std::string & roomUUID);
  72. };