DDraceNetwork Documentation
Loading...
Searching...
No Matches
CScoreboard Class Reference

#include <scoreboard.h>

Inheritance diagram for CScoreboard:
[legend]
Collaboration diagram for CScoreboard:
[legend]

Classes

struct  CScoreboardRenderState
class  CScoreboardPopupContext
class  CPlayerElement

Public Member Functions

 CScoreboard ()
int Sizeof () const override
void OnConsoleInit () override
void OnInit () override
void OnReset () override
void OnRender () override
void OnRelease () override
bool OnCursorMove (float x, float y, IInput::ECursorType CursorType) override
bool OnInput (const IInput::CEvent &Event) override
bool IsActive () const
Public Member Functions inherited from CComponent
virtual void OnStateChange (int NewState, int OldState)
virtual void OnShutdown ()
virtual void OnWindowResize ()
virtual void OnUpdate ()
virtual void OnNewSnapshot ()
virtual void OnMapLoad ()
virtual void OnMessage (int Msg, void *pRawMsg)
virtual bool OnTouchState (const std::vector< IInput::CTouchFingerState > &vTouchFingerStates)
Public Member Functions inherited from CComponentInterfaces
virtual void OnInterfacesInit (CGameClient *pClient)
virtual ~CComponentInterfaces ()=default

Private Member Functions

void RenderTitle (CUIRect TitleBar, int Team, const char *pTitle)
void RenderGoals (CUIRect Goals)
void RenderSpectators (CUIRect Spectators)
void RenderScoreboard (CUIRect Scoreboard, int Team, int CountStart, int CountEnd, CScoreboardRenderState &State)
void RenderRecordingNotification (float x)
const char * GetTeamName (int Team) const
void SetUiMousePos (vec2 Pos)
void LockMouse ()

Static Private Member Functions

static void ConKeyScoreboard (IConsole::IResult *pResult, void *pUserData)
static void ConToggleScoreboardCursor (IConsole::IResult *pResult, void *pUserData)
static CUi::EPopupMenuFunctionResult PopupScoreboard (void *pContext, CUIRect View, bool Active)

Private Attributes

bool m_Active
IGraphics::CTextureHandle m_DeadTeeTexture
std::optional< vec2m_LastMousePos
bool m_MouseUnlocked = false
CScoreboard::CScoreboardPopupContext m_ScoreboardPopupContext
CPlayerElement m_aPlayers [MAX_CLIENTS]

Additional Inherited Members

Protected Member Functions inherited from CComponentInterfaces
class CGameClientGameClient () const
class IClientClient () const
class IKernelKernel () const
class IEngineEngine () const
class IGraphicsGraphics () const
class ITextRenderTextRender () const
class IInputInput () const
class IStorageStorage () const
class CUiUi () const
class ISoundSound () const
class CRenderToolsRenderTools () const
class CRenderMapRenderMap () const
class IConfigManagerConfigManager () const
class CConfigConfig () const
class IConsoleConsole () const
class IDemoPlayerDemoPlayer () const
class IDemoRecorderDemoRecorder (int Recorder) const
class IFavoritesFavorites () const
class IServerBrowserServerBrowser () const
class CLayersLayers () const
class CCollisionCollision () const
int64_t time () const
float LocalTime () const
class IHttpHttp () const

Constructor & Destructor Documentation

◆ CScoreboard()

CScoreboard::CScoreboard ( )

Member Function Documentation

◆ ConKeyScoreboard()

void CScoreboard::ConKeyScoreboard ( IConsole::IResult * pResult,
void * pUserData )
staticprivate

◆ ConToggleScoreboardCursor()

void CScoreboard::ConToggleScoreboardCursor ( IConsole::IResult * pResult,
void * pUserData )
staticprivate

◆ GetTeamName()

const char * CScoreboard::GetTeamName ( int Team) const
private

◆ IsActive()

bool CScoreboard::IsActive ( ) const

◆ LockMouse()

void CScoreboard::LockMouse ( )
private

◆ OnConsoleInit()

void CScoreboard::OnConsoleInit ( )
overridevirtual

Called to let the components register their console commands.

Reimplemented from CComponent.

◆ OnCursorMove()

bool CScoreboard::OnCursorMove ( float x,
float y,
IInput::ECursorType CursorType )
overridevirtual

Called on mouse movement, where the x and y values are deltas.

Parameters
xThe amount of change in the x coordinate since the last call.
yThe amount of change in the y coordinate since the last call.
CursorTypeThe type of cursor that caused the movement.

Reimplemented from CComponent.

◆ OnInit()

void CScoreboard::OnInit ( )
overridevirtual

Called to let the components run initialization code.

Reimplemented from CComponent.

◆ OnInput()

bool CScoreboard::OnInput ( const IInput::CEvent & Event)
overridevirtual

Called on a input event.

Parameters
EventThe input event.

Reimplemented from CComponent.

◆ OnRelease()

void CScoreboard::OnRelease ( )
overridevirtual

Called when the input gets released, for example when a text box loses focus.

Reimplemented from CComponent.

◆ OnRender()

void CScoreboard::OnRender ( )
overridevirtual

Called when the component should get rendered.

The render order depends on the component insertion order.

Reimplemented from CComponent.

◆ OnReset()

void CScoreboard::OnReset ( )
overridevirtual

Called to reset the component. This method is usually called on your component constructor to avoid code duplication.

See also
CHud::CHud()
CHud::OnReset()

Reimplemented from CComponent.

◆ PopupScoreboard()

CUi::EPopupMenuFunctionResult CScoreboard::PopupScoreboard ( void * pContext,
CUIRect View,
bool Active )
staticprivate

◆ RenderGoals()

void CScoreboard::RenderGoals ( CUIRect Goals)
private

◆ RenderRecordingNotification()

void CScoreboard::RenderRecordingNotification ( float x)
private

◆ RenderScoreboard()

void CScoreboard::RenderScoreboard ( CUIRect Scoreboard,
int Team,
int CountStart,
int CountEnd,
CScoreboardRenderState & State )
private

◆ RenderSpectators()

void CScoreboard::RenderSpectators ( CUIRect Spectators)
private

◆ RenderTitle()

void CScoreboard::RenderTitle ( CUIRect TitleBar,
int Team,
const char * pTitle )
private

◆ SetUiMousePos()

void CScoreboard::SetUiMousePos ( vec2 Pos)
private

◆ Sizeof()

int CScoreboard::Sizeof ( ) const
inlineoverridevirtual

Gets the size of the non-abstract component.

Implements CComponent.

Member Data Documentation

◆ m_Active

bool CScoreboard::m_Active
private

◆ m_aPlayers

CPlayerElement CScoreboard::m_aPlayers[MAX_CLIENTS]
private

◆ m_DeadTeeTexture

IGraphics::CTextureHandle CScoreboard::m_DeadTeeTexture
private

◆ m_LastMousePos

std::optional<vec2> CScoreboard::m_LastMousePos
private

◆ m_MouseUnlocked

bool CScoreboard::m_MouseUnlocked = false
private

◆ m_ScoreboardPopupContext

CScoreboard::CScoreboardPopupContext CScoreboard::m_ScoreboardPopupContext
private

The documentation for this class was generated from the following files: