iw4x-client/src/Components/Modules/ServerInfo.hpp

46 lines
832 B
C++
Raw Normal View History

2017-01-20 08:36:52 -05:00
#pragma once
2017-01-19 16:23:59 -05:00
namespace Components
{
class ServerInfo : public Component
{
public:
ServerInfo();
~ServerInfo();
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
2017-01-20 08:36:52 -05:00
const char* getName() override { return "ServerInfo"; };
2017-01-19 16:23:59 -05:00
#endif
static Utils::InfoString GetInfo();
private:
class Container
{
public:
class Player
{
public:
int ping;
int score;
std::string name;
};
unsigned int currentPlayer;
std::vector<Player> playerList;
Network::Address target;
};
static Container PlayerContainer;
static void ServerStatus(UIScript::Token);
static unsigned int GetPlayerCount();
static const char* GetPlayerText(unsigned int index, int column);
static void SelectPlayer(unsigned int index);
static void DrawScoreboardInfo(void* a1);
static void DrawScoreboardStub();
};
}