2023-12-27 19:07:49 +02:00
|
|
|
/*
|
|
|
|
* GlobalLobbyWidget.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../gui/InterfaceObjectConfigurable.h"
|
|
|
|
|
|
|
|
class GlobalLobbyWindow;
|
2024-01-21 16:48:36 +02:00
|
|
|
struct GlobalLobbyAccount;
|
|
|
|
struct GlobalLobbyRoom;
|
|
|
|
class CListBox;
|
2023-12-27 19:07:49 +02:00
|
|
|
|
|
|
|
class GlobalLobbyWidget : public InterfaceObjectConfigurable
|
|
|
|
{
|
|
|
|
GlobalLobbyWindow * window;
|
2024-01-11 22:51:36 +02:00
|
|
|
|
2024-01-21 16:48:36 +02:00
|
|
|
std::shared_ptr<CIntObject> buildAccountList(const JsonNode &) const;
|
|
|
|
std::shared_ptr<CIntObject> buildRoomList(const JsonNode &) const;
|
|
|
|
|
2023-12-27 19:07:49 +02:00
|
|
|
public:
|
2024-02-02 02:36:57 +02:00
|
|
|
explicit GlobalLobbyWidget(GlobalLobbyWindow * window);
|
2023-12-27 19:07:49 +02:00
|
|
|
|
|
|
|
std::shared_ptr<CLabel> getAccountNameLabel();
|
|
|
|
std::shared_ptr<CTextInput> getMessageInput();
|
|
|
|
std::shared_ptr<CTextBox> getGameChat();
|
2024-01-21 16:48:36 +02:00
|
|
|
std::shared_ptr<CListBox> getAccountList();
|
|
|
|
std::shared_ptr<CListBox> getRoomList();
|
|
|
|
};
|
|
|
|
|
|
|
|
class GlobalLobbyAccountCard : public CIntObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GlobalLobbyAccountCard(GlobalLobbyWindow * window, const GlobalLobbyAccount & accountDescription);
|
|
|
|
|
|
|
|
std::shared_ptr<TransparentFilledRectangle> backgroundOverlay;
|
|
|
|
std::shared_ptr<CLabel> labelName;
|
|
|
|
std::shared_ptr<CLabel> labelStatus;
|
|
|
|
std::shared_ptr<CButton> buttonInvite;
|
|
|
|
};
|
|
|
|
|
|
|
|
class GlobalLobbyRoomCard : public CIntObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GlobalLobbyRoomCard(GlobalLobbyWindow * window, const GlobalLobbyRoom & roomDescription);
|
|
|
|
|
|
|
|
std::shared_ptr<TransparentFilledRectangle> backgroundOverlay;
|
|
|
|
std::shared_ptr<CLabel> labelName;
|
|
|
|
std::shared_ptr<CLabel> labelRoomSize;
|
2024-03-11 19:47:35 +02:00
|
|
|
std::shared_ptr<CLabel> labelDescription;
|
2024-01-21 16:48:36 +02:00
|
|
|
std::shared_ptr<CButton> buttonJoin;
|
2024-03-11 17:52:33 +02:00
|
|
|
std::shared_ptr<CPicture> iconRoomSize;
|
2023-12-27 19:07:49 +02:00
|
|
|
};
|