DDraceNetwork Docs
CSpectator Class Reference

#include <spectator.h>

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

Public Member Functions

 CSpectator ()
 
virtual int Sizeof () const override
 
virtual void OnConsoleInit () override
 
virtual bool OnCursorMove (float x, float y, IInput::ECursorType CursorType) override
 
virtual bool OnInput (const IInput::CEvent &Event) override
 
virtual void OnRender () override
 
virtual void OnRelease () override
 
virtual void OnReset () override
 
void Spectate (int SpectatorId)
 
void SpectateClosest ()
 
bool IsActive () const
 
- Public Member Functions inherited from CComponent
virtual ~CComponent ()
 
virtual int Sizeof () const =0
 
class CGameClientGameClient () const
 
class IClientClient () const
 
virtual void OnStateChange (int NewState, int OldState)
 
virtual void OnConsoleInit ()
 
virtual void OnInit ()
 
virtual void OnShutdown ()
 
virtual void OnReset ()
 
virtual void OnWindowResize ()
 
virtual void OnRefreshSkins ()
 
virtual void OnRender ()
 
virtual void OnNewSnapshot ()
 
virtual void OnRelease ()
 
virtual void OnMapLoad ()
 
virtual void OnMessage (int Msg, void *pRawMsg)
 
virtual bool OnCursorMove (float x, float y, IInput::ECursorType CursorType)
 
virtual bool OnInput (const IInput::CEvent &Event)
 

Private Types

enum  { MULTI_VIEW = -4 , NO_SELECTION = -3 }
 

Private Member Functions

bool CanChangeSpectator ()
 
void SpectateNext (bool Reverse)
 

Static Private Member Functions

static void ConKeySpectator (IConsole::IResult *pResult, void *pUserData)
 
static void ConSpectate (IConsole::IResult *pResult, void *pUserData)
 
static void ConSpectateNext (IConsole::IResult *pResult, void *pUserData)
 
static void ConSpectatePrevious (IConsole::IResult *pResult, void *pUserData)
 
static void ConSpectateClosest (IConsole::IResult *pResult, void *pUserData)
 
static void ConMultiView (IConsole::IResult *pResult, void *pUserData)
 

Private Attributes

bool m_Active
 
bool m_WasActive
 
int m_SelectedSpectatorId
 
vec2 m_SelectorMouse
 
CUi::CTouchState m_TouchState
 
float m_MultiViewActivateDelay
 

Additional Inherited Members

- Protected Member Functions inherited from CComponent
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 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
 
- Protected Attributes inherited from CComponent
CGameClientm_pClient
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
MULTI_VIEW 
NO_SELECTION 

Constructor & Destructor Documentation

◆ CSpectator()

CSpectator::CSpectator ( )

Member Function Documentation

◆ CanChangeSpectator()

bool CSpectator::CanChangeSpectator ( )
private

◆ ConKeySpectator()

void CSpectator::ConKeySpectator ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConMultiView()

void CSpectator::ConMultiView ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConSpectate()

void CSpectator::ConSpectate ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConSpectateClosest()

void CSpectator::ConSpectateClosest ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConSpectateNext()

void CSpectator::ConSpectateNext ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConSpectatePrevious()

void CSpectator::ConSpectatePrevious ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ IsActive()

bool CSpectator::IsActive ( ) const
inline

◆ OnConsoleInit()

void CSpectator::OnConsoleInit ( )
overridevirtual

Called to let the components register their console commands.

Reimplemented from CComponent.

◆ OnCursorMove()

bool CSpectator::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.

◆ OnInput()

bool CSpectator::OnInput ( const IInput::CEvent Event)
overridevirtual

Called on a input event.

Parameters
EventThe input event.

Reimplemented from CComponent.

◆ OnRelease()

void CSpectator::OnRelease ( )
overridevirtual

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

Reimplemented from CComponent.

◆ OnRender()

void CSpectator::OnRender ( )
overridevirtual

Called when the component should get rendered.

The render order depends on the component insertion order.

Reimplemented from CComponent.

◆ OnReset()

void CSpectator::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.

◆ Sizeof()

virtual int CSpectator::Sizeof ( ) const
inlineoverridevirtual

Gets the size of the non-abstract component.

Implements CComponent.

◆ Spectate()

void CSpectator::Spectate ( int  SpectatorId)

◆ SpectateClosest()

void CSpectator::SpectateClosest ( )

◆ SpectateNext()

void CSpectator::SpectateNext ( bool  Reverse)
private

Member Data Documentation

◆ m_Active

bool CSpectator::m_Active
private

◆ m_MultiViewActivateDelay

float CSpectator::m_MultiViewActivateDelay
private

◆ m_SelectedSpectatorId

int CSpectator::m_SelectedSpectatorId
private

◆ m_SelectorMouse

vec2 CSpectator::m_SelectorMouse
private

◆ m_TouchState

CUi::CTouchState CSpectator::m_TouchState
private

◆ m_WasActive

bool CSpectator::m_WasActive
private

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