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();
|
|
|
|
|
2019-01-09 15:40:56 -05:00
|
|
|
static Utils::InfoString GetHostInfo();
|
2017-01-19 16:23:59 -05:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2022-04-12 17:15:50 -04:00
|
|
|
static Game::dvar_t** CGScoreboardHeight;
|
|
|
|
static Game::dvar_t** CGScoreboardWidth;
|
|
|
|
|
2017-01-19 16:23:59 -05:00
|
|
|
static Container PlayerContainer;
|
|
|
|
|
2022-08-24 10:38:14 -04:00
|
|
|
static void ServerStatus([[maybe_unused]] const UIScript::Token& token, [[maybe_unused]] const Game::uiInfo_s* info);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
|
|
|
static unsigned int GetPlayerCount();
|
|
|
|
static const char* GetPlayerText(unsigned int index, int column);
|
|
|
|
static void SelectPlayer(unsigned int index);
|
|
|
|
|
2021-09-07 19:53:25 -04:00
|
|
|
static void DrawScoreboardInfo(int localClientNum);
|
2017-01-19 16:23:59 -05:00
|
|
|
static void DrawScoreboardStub();
|
|
|
|
};
|
|
|
|
}
|