2
0

GlobalLobbyInviteWindow.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * GlobalLobbyInviteWindow.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 "GlobalLobbyObserver.h"
  12. #include "../windows/CWindowObject.h"
  13. class CLabel;
  14. class FilledTexturePlayerColored;
  15. class TransparentFilledRectangle;
  16. class CListBox;
  17. class CButton;
  18. struct GlobalLobbyAccount;
  19. class GlobalLobbyInviteWindow final : public CWindowObject, public GlobalLobbyObserver
  20. {
  21. std::shared_ptr<FilledTexturePlayerColored> filledBackground;
  22. std::shared_ptr<CLabel> labelTitle;
  23. std::shared_ptr<CListBox> accountList;
  24. std::shared_ptr<TransparentFilledRectangle> listBackground;
  25. std::shared_ptr<CButton> buttonClose;
  26. void onActiveGameRooms(const std::vector<GlobalLobbyRoom> & rooms) override;
  27. void onActiveAccounts(const std::vector<GlobalLobbyAccount> & accounts) override;
  28. public:
  29. GlobalLobbyInviteWindow();
  30. };
  31. class GlobalLobbyInviteAccountCard : public CIntObject
  32. {
  33. std::string accountID;
  34. std::shared_ptr<TransparentFilledRectangle> backgroundOverlay;
  35. std::shared_ptr<CLabel> labelName;
  36. std::shared_ptr<CLabel> labelStatus;
  37. std::shared_ptr<CLabel> labelInviteStatus;
  38. std::shared_ptr<CButton> buttonInvite;
  39. void clickPressed(const Point & cursorPosition) override;
  40. public:
  41. GlobalLobbyInviteAccountCard(const GlobalLobbyAccount & accountDescription);
  42. };