GlobalLobbyLoginWindow.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * GlobalLobbyLoginWindow.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. class CLabel;
  13. class CTextBox;
  14. class CTextInput;
  15. class CToggleGroup;
  16. class FilledTexturePlayerColored;
  17. class TransparentFilledRectangle;
  18. class CButton;
  19. class GlobalLobbyLoginWindow : public CWindowObject
  20. {
  21. std::shared_ptr<FilledTexturePlayerColored> filledBackground;
  22. std::shared_ptr<CLabel> labelTitle;
  23. std::shared_ptr<CLabel> labelUsernameTitle;
  24. std::shared_ptr<CLabel> labelUsername;
  25. std::shared_ptr<CTextBox> labelStatus;
  26. std::shared_ptr<TransparentFilledRectangle> backgroundUsername;
  27. std::shared_ptr<CTextInput> inputUsername;
  28. std::shared_ptr<CButton> buttonLogin;
  29. std::shared_ptr<CButton> buttonClose;
  30. std::shared_ptr<CToggleGroup> toggleMode; // create account or use existing
  31. void onLoginModeChanged(int value);
  32. void onClose();
  33. void onLogin();
  34. public:
  35. GlobalLobbyLoginWindow();
  36. void onConnectionSuccess();
  37. void onLoginSuccess();
  38. void onConnectionFailed(const std::string & reason);
  39. };