DDraceNetwork Docs
CGameConsole Class Reference

#include <console.h>

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

Classes

class  CInstance
 

Public Types

enum  { CONSOLETYPE_LOCAL = 0 , CONSOLETYPE_REMOTE }
 

Public Member Functions

 CGameConsole ()
 
 ~CGameConsole ()
 
virtual int Sizeof () const override
 
void PrintLine (int Type, const char *pLine)
 
void RequireUsername (bool UsernameReq)
 
virtual void OnStateChange (int NewState, int OldState) override
 
virtual void OnConsoleInit () override
 
virtual void OnInit () override
 
virtual void OnReset () override
 
virtual void OnRender () override
 
virtual void OnMessage (int MsgType, void *pRawMsg) override
 
virtual bool OnInput (const IInput::CEvent &Event) override
 
void Prompt (char(&aPrompt)[32])
 
void Toggle (int Type)
 
bool IsClosed ()
 
- 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 Member Functions

CInstanceConsoleForType (int ConsoleType)
 
CInstanceCurrentConsole ()
 

Static Private Member Functions

static void PossibleCommandsRenderCallback (int Index, const char *pStr, void *pUser)
 
static void ConToggleLocalConsole (IConsole::IResult *pResult, void *pUserData)
 
static void ConToggleRemoteConsole (IConsole::IResult *pResult, void *pUserData)
 
static void ConClearLocalConsole (IConsole::IResult *pResult, void *pUserData)
 
static void ConClearRemoteConsole (IConsole::IResult *pResult, void *pUserData)
 
static void ConDumpLocalConsole (IConsole::IResult *pResult, void *pUserData)
 
static void ConDumpRemoteConsole (IConsole::IResult *pResult, void *pUserData)
 
static void ConConsolePageUp (IConsole::IResult *pResult, void *pUserData)
 
static void ConConsolePageDown (IConsole::IResult *pResult, void *pUserData)
 
static void ConchainConsoleOutputLevel (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
 

Private Attributes

class IConsolem_pConsole
 
CConsoleLoggerm_pConsoleLogger = nullptr
 
CInstance m_LocalConsole
 
CInstance m_RemoteConsole
 
int m_ConsoleType
 
int m_ConsoleState
 
float m_StateChangeEnd
 
float m_StateChangeDuration
 
bool m_WantsSelectionCopy = false
 
CUi::CTouchState m_TouchState
 

Static Private Attributes

static const ColorRGBA ms_SearchHighlightColor = ColorRGBA(1.0f, 0.0f, 0.0f, 1.0f)
 
static const ColorRGBA ms_SearchSelectedColor = ColorRGBA(1.0f, 1.0f, 0.0f, 1.0f)
 

Friends

class CConsoleLogger
 

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
Enumerator
CONSOLETYPE_LOCAL 
CONSOLETYPE_REMOTE 

Constructor & Destructor Documentation

◆ CGameConsole()

CGameConsole::CGameConsole ( )

◆ ~CGameConsole()

CGameConsole::~CGameConsole ( )

Member Function Documentation

◆ ConchainConsoleOutputLevel()

void CGameConsole::ConchainConsoleOutputLevel ( IConsole::IResult pResult,
void *  pUserData,
IConsole::FCommandCallback  pfnCallback,
void *  pCallbackUserData 
)
staticprivate

◆ ConClearLocalConsole()

void CGameConsole::ConClearLocalConsole ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConClearRemoteConsole()

void CGameConsole::ConClearRemoteConsole ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConConsolePageDown()

void CGameConsole::ConConsolePageDown ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConConsolePageUp()

void CGameConsole::ConConsolePageUp ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConDumpLocalConsole()

void CGameConsole::ConDumpLocalConsole ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConDumpRemoteConsole()

void CGameConsole::ConDumpRemoteConsole ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConsoleForType()

CGameConsole::CInstance * CGameConsole::ConsoleForType ( int  ConsoleType)
private

◆ ConToggleLocalConsole()

void CGameConsole::ConToggleLocalConsole ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConToggleRemoteConsole()

void CGameConsole::ConToggleRemoteConsole ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ CurrentConsole()

CGameConsole::CInstance * CGameConsole::CurrentConsole ( )
private

◆ IsClosed()

bool CGameConsole::IsClosed ( )
inline

◆ OnConsoleInit()

void CGameConsole::OnConsoleInit ( )
overridevirtual

Called to let the components register their console commands.

Reimplemented from CComponent.

◆ OnInit()

void CGameConsole::OnInit ( )
overridevirtual

Called to let the components run initialization code.

Reimplemented from CComponent.

◆ OnInput()

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

Called on a input event.

Parameters
EventThe input event.

Reimplemented from CComponent.

◆ OnMessage()

void CGameConsole::OnMessage ( int  Msg,
void *  pRawMsg 
)
overridevirtual

Called when receiving a network message.

Parameters
MsgThe message type.
pRawMsgThe message data.
See also
NETMSGTYPE_SV_DDRACETIME
CNetMsg_Sv_DDRaceTime

Reimplemented from CComponent.

◆ OnRender()

void CGameConsole::OnRender ( )
overridevirtual

Called when the component should get rendered.

The render order depends on the component insertion order.

Reimplemented from CComponent.

◆ OnReset()

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

◆ OnStateChange()

void CGameConsole::OnStateChange ( int  NewState,
int  OldState 
)
overridevirtual

This method is called when the client changes state, e.g from offline to online.

See also
IClient::STATE_CONNECTING
IClient::STATE_LOADING
IClient::STATE_ONLINE

Reimplemented from CComponent.

◆ PossibleCommandsRenderCallback()

void CGameConsole::PossibleCommandsRenderCallback ( int  Index,
const char *  pStr,
void *  pUser 
)
staticprivate

◆ PrintLine()

void CGameConsole::PrintLine ( int  Type,
const char *  pLine 
)

◆ Prompt()

void CGameConsole::Prompt ( char(&)  aPrompt[32])

◆ RequireUsername()

void CGameConsole::RequireUsername ( bool  UsernameReq)

◆ Sizeof()

virtual int CGameConsole::Sizeof ( ) const
inlineoverridevirtual

Gets the size of the non-abstract component.

Implements CComponent.

◆ Toggle()

void CGameConsole::Toggle ( int  Type)

Friends And Related Function Documentation

◆ CConsoleLogger

friend class CConsoleLogger
friend

Member Data Documentation

◆ m_ConsoleState

int CGameConsole::m_ConsoleState
private

◆ m_ConsoleType

int CGameConsole::m_ConsoleType
private

◆ m_LocalConsole

CInstance CGameConsole::m_LocalConsole
private

◆ m_pConsole

class IConsole* CGameConsole::m_pConsole
private

◆ m_pConsoleLogger

CConsoleLogger* CGameConsole::m_pConsoleLogger = nullptr
private

◆ m_RemoteConsole

CInstance CGameConsole::m_RemoteConsole
private

◆ m_StateChangeDuration

float CGameConsole::m_StateChangeDuration
private

◆ m_StateChangeEnd

float CGameConsole::m_StateChangeEnd
private

◆ m_TouchState

CUi::CTouchState CGameConsole::m_TouchState
private

◆ m_WantsSelectionCopy

bool CGameConsole::m_WantsSelectionCopy = false
private

◆ ms_SearchHighlightColor

const ColorRGBA CGameConsole::ms_SearchHighlightColor = ColorRGBA(1.0f, 0.0f, 0.0f, 1.0f)
staticprivate

◆ ms_SearchSelectedColor

const ColorRGBA CGameConsole::ms_SearchSelectedColor = ColorRGBA(1.0f, 1.0f, 0.0f, 1.0f)
staticprivate

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