mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 22:18:19 +00:00
Merge pull request #8545 from Robyt3/Scoreboard-Refactoring
Various improvements to scoreboard rendering, refactoring
This commit is contained in:
commit
222a7a7453
File diff suppressed because it is too large
Load diff
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue