2016-01-07 20:20:55 -05:00
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class ServerInfo : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ServerInfo();
|
|
|
|
~ServerInfo();
|
|
|
|
const char* GetName() { return "ServerInfo"; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
struct Container
|
|
|
|
{
|
|
|
|
struct Player
|
|
|
|
{
|
|
|
|
int Ping;
|
|
|
|
int Score;
|
|
|
|
std::string Name;
|
|
|
|
};
|
|
|
|
|
2016-01-10 06:25:31 -05:00
|
|
|
unsigned int CurrentPlayer;
|
2016-01-07 20:20:55 -05:00
|
|
|
std::vector<Player> PlayerList;
|
|
|
|
Network::Address Target;
|
|
|
|
};
|
|
|
|
|
|
|
|
static Container PlayerContainer;
|
|
|
|
|
|
|
|
static void ServerStatus();
|
|
|
|
|
2016-01-10 06:25:31 -05:00
|
|
|
static unsigned int GetPlayerCount();
|
|
|
|
static const char* GetPlayerText(unsigned int index, int column);
|
|
|
|
static void SelectPlayer(unsigned int index);
|
2016-01-07 20:20:55 -05:00
|
|
|
};
|
|
|
|
}
|