1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
vcmi/client/globalLobby/GlobalLobbyWidget.h

58 lines
1.6 KiB
C++
Raw Normal View History

/*
* 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;
2024-01-11 22:51:36 +02:00
std::shared_ptr<CIntObject> buildAccountList(const JsonNode &) const;
std::shared_ptr<CIntObject> buildRoomList(const JsonNode &) const;
public:
2024-02-02 02:36:57 +02:00
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);
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;
std::shared_ptr<CLabel> labelStatus;
std::shared_ptr<CButton> buttonJoin;
};