1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-02 09:02:03 +02:00
vcmi/client/globalLobby/GlobalLobbyWidget.h
2024-02-02 13:09:12 +02:00

62 lines
1.6 KiB
C++

/*
* 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;
struct GlobalLobbyAccount;
struct GlobalLobbyRoom;
class CListBox;
class GlobalLobbyWidget : public InterfaceObjectConfigurable
{
GlobalLobbyWindow * window;
std::shared_ptr<CIntObject> buildAccountList(const JsonNode &) const;
std::shared_ptr<CIntObject> buildRoomList(const JsonNode &) const;
public:
explicit GlobalLobbyWidget(GlobalLobbyWindow * window);
std::shared_ptr<CLabel> getAccountNameLabel();
std::shared_ptr<CTextInput> getMessageInput();
std::shared_ptr<CTextBox> getGameChat();
std::shared_ptr<CListBox> getAccountList();
std::shared_ptr<CListBox> getRoomList();
};
class GlobalLobbyAccountCard : public CIntObject
{
public:
GlobalLobbyAccountCard(GlobalLobbyWindow * window, const GlobalLobbyAccount & accountDescription);
GlobalLobbyWindow * window;
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);
GlobalLobbyWindow * window;
std::shared_ptr<TransparentFilledRectangle> backgroundOverlay;
std::shared_ptr<CLabel> labelName;
std::shared_ptr<CLabel> labelRoomSize;
std::shared_ptr<CLabel> labelStatus;
std::shared_ptr<CButton> buttonJoin;
};