Merge pull request #8545 from Robyt3/Scoreboard-Refactoring

Various improvements to scoreboard rendering, refactoring
This commit is contained in:
Dennis Felsing 2024-07-01 21:54:52 +00:00 committed by GitHub
commit 222a7a7453
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 426 additions and 426 deletions

File diff suppressed because it is too large Load diff

View file

@ -6,36 +6,32 @@
#include <engine/console.h> #include <engine/console.h>
#include <game/client/component.h> #include <game/client/component.h>
#include <game/client/ui_rect.h>
class CScoreboard : public CComponent class CScoreboard : public CComponent
{ {
void RenderGoals(float x, float y, float w); void RenderTitle(CUIRect TitleBar, int Team, const char *pTitle);
void RenderSpectators(float x, float y, float w, float h); void RenderGoals(CUIRect Goals);
void RenderScoreboard(float x, float y, float w, int Team, const char *pTitle, int NumPlayers = -1); void RenderSpectators(CUIRect Spectators);
void RenderScoreboard(CUIRect Scoreboard, int Team, int CountStart, int CountEnd);
void RenderRecordingNotification(float x); void RenderRecordingNotification(float x);
static void ConKeyScoreboard(IConsole::IResult *pResult, void *pUserData); static void ConKeyScoreboard(IConsole::IResult *pResult, void *pUserData);
const char *GetTeamName(int Team) const;
const char *GetClanName(int Team);
bool m_Active; bool m_Active;
float m_ServerRecord;
public: public:
CScoreboard(); CScoreboard();
virtual int Sizeof() const override { return sizeof(*this); } virtual int Sizeof() const override { return sizeof(*this); }
virtual void OnReset() override;
virtual void OnConsoleInit() override; virtual void OnConsoleInit() override;
virtual void OnReset() override;
virtual void OnRender() override; virtual void OnRender() override;
virtual void OnRelease() override; virtual void OnRelease() override;
bool Active();
// DDRace
virtual void OnMessage(int MsgType, void *pRawMsg) override; virtual void OnMessage(int MsgType, void *pRawMsg) override;
private: bool Active() const;
float m_ServerRecord;
}; };
#endif #endif