DDraceNetwork Docs
|
#include <component.h>
Public Member Functions | |
virtual | ~CComponent () |
virtual int | Sizeof () const =0 |
class CGameClient * | GameClient () const |
class IClient * | Client () 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) |
Protected Member Functions | |
class IKernel * | Kernel () const |
class IEngine * | Engine () const |
class IGraphics * | Graphics () const |
class ITextRender * | TextRender () const |
class IInput * | Input () const |
class IStorage * | Storage () const |
class CUi * | Ui () const |
class ISound * | Sound () const |
class CRenderTools * | RenderTools () const |
class IConfigManager * | ConfigManager () const |
class CConfig * | Config () const |
class IConsole * | Console () const |
class IDemoPlayer * | DemoPlayer () const |
class IDemoRecorder * | DemoRecorder (int Recorder) const |
class IFavorites * | Favorites () const |
class IServerBrowser * | ServerBrowser () const |
class CLayers * | Layers () const |
class CCollision * | Collision () const |
int64_t | time () const |
float | LocalTime () const |
class IHttp * | Http () const |
Protected Attributes | |
CGameClient * | m_pClient |
Friends | |
class | CGameClient |
This class is inherited by all the client components.
These components can implement the virtual methods such as OnInit(), OnMessage(int Msg, void *pRawMsg) to provide their functionality.
|
inlinevirtual |
The component virtual destructor.
class IClient * CComponent::Client | ( | ) | const |
Get the client interface.
|
protected |
Get the collision interface.
|
protected |
Get the config interface.
|
protected |
Get the config manager interface.
|
protected |
Get the console interface.
|
protected |
Get the demo player interface.
|
protected |
Get the demo recorder interface.
Recorder | A member of the RECORDER_x enum |
|
protected |
|
protected |
|
inline |
Get a pointer to the game client.
|
protected |
Get the graphics interface.
|
protected |
Get the http interface
|
protected |
Get the input interface.
|
protected |
Get the kernel interface.
|
protected |
Get the layers interface.
|
protected |
Gets the local time.
|
inlinevirtual |
Called to let the components register their console commands.
Reimplemented in CBinds, CCamera, CChat, CGameConsole, CControls, CEmoticon, CGhost, CMenus, CScoreboard, CSpectator, CStatboard, and CVoting.
|
inlinevirtual |
Called on mouse movement, where the x and y values are deltas.
x | The amount of change in the x coordinate since the last call. |
y | The amount of change in the y coordinate since the last call. |
CursorType | The type of cursor that caused the movement. |
Reimplemented in CControls, CEmoticon, CMenus, and CSpectator.
|
inlinevirtual |
Called to let the components run initialization code.
Reimplemented in CBackground, CChat, CGameConsole, CCountryFlags, CDamageInd, CHud, CInfoMessages, CItems, CMapImages, CMapLayers, CMenuBackground, CMenus, CNamePlates, CParticles, CPlayers, CSkins, CSkins7, and CSounds.
|
inlinevirtual |
Called on a input event.
Event | The input event. |
Reimplemented in CBinds::CBindsSpecial, CBinds, CChat, CGameConsole, CEmoticon, CMenusKeyBinder, CMenus, CMotd, and CSpectator.
|
inlinevirtual |
Called on map load.
Reimplemented in CBackground, CGhost, CMapImages, CMapLayers, CMapSounds, CMenuBackground, and CRaceDemo.
|
inlinevirtual |
Called when receiving a network message.
Msg | The message type. |
pRawMsg | The message data. |
Reimplemented in CBroadcast, CChat, CGameConsole, CControls, CGhost, CHud, CInfoMessages, CMotd, CRaceDemo, CScoreboard, CStatboard, and CVoting.
|
inlinevirtual |
|
inlinevirtual |
Called when skins have been invalidated and must be updated.
Reimplemented in CChat, CGhost, CInfoMessages, and CMenus.
|
inlinevirtual |
Called when the input gets released, for example when a text box loses focus.
Reimplemented in CChat, CEmoticon, CScoreboard, CSpectator, and CStatboard.
|
inlinevirtual |
Called when the component should get rendered.
The render order depends on the component insertion order.
Reimplemented in CBackground, CBroadcast, CCamera, CChat, CGameConsole, CControls, CDamageInd, CDebugHud, CEffects, CEmoticon, CFreezeBars, CGhost, CHud, CInfoMessages, CItems, CMapLayers, CMapSounds, CMenuBackground, CMenus, CMotd, CNamePlates, CParticles, CParticles::CRenderGroup< TGROUP >, CParticles::CRenderGroup< GROUP_PROJECTILE_TRAIL >, CParticles::CRenderGroup< GROUP_TRAIL_EXTRA >, CParticles::CRenderGroup< GROUP_EXPLOSIONS >, CParticles::CRenderGroup< GROUP_EXTRA >, CParticles::CRenderGroup< GROUP_GENERAL >, CPlayers, CScoreboard, CSounds, CSpectator, CStatboard, and CTooltips.
|
inlinevirtual |
Called to reset the component. This method is usually called on your component constructor to avoid code duplication.
Reimplemented in CBroadcast, CCamera, CGameConsole, CControls, CDamageInd, CEmoticon, CGhost, CHud, CInfoMessages, CMenus, CParticles, CRaceDemo, CScoreboard, CSounds, CSpectator, CStatboard, CTooltips, and CVoting.
|
inlinevirtual |
|
inlinevirtual |
This method is called when the client changes state, e.g from offline to online.
Reimplemented in CChat, CGameConsole, CMapSounds, CMenus, CMotd, CRaceDemo, and CSounds.
|
inlinevirtual |
Called when the window has been resized.
Reimplemented in CBroadcast, CChat, CHud, CInfoMessages, CMenus, CMotd, and CNamePlates.
|
protected |
Get the render tools interface.
|
protected |
Get the server browser interface.
|
pure virtual |
Gets the size of the non-abstract component.
Implemented in CBackground, CBinds, CBinds::CBindsSpecial, CBroadcast, CCamera, CChat, CGameConsole, CControls, CCountryFlags, CDamageInd, CDebugHud, CEffects, CEmoticon, CFlow, CFreezeBars, CGhost, CHud, CInfoMessages, CItems, CMapImages, CMapLayers, CMapSounds, CMenuBackground, CMenusKeyBinder, CMenus, CMotd, CNamePlates, CParticles, CParticles::CRenderGroup< TGROUP >, CParticles::CRenderGroup< GROUP_PROJECTILE_TRAIL >, CParticles::CRenderGroup< GROUP_TRAIL_EXTRA >, CParticles::CRenderGroup< GROUP_EXPLOSIONS >, CParticles::CRenderGroup< GROUP_EXTRA >, CParticles::CRenderGroup< GROUP_GENERAL >, CPlayers, CRaceDemo, CScoreboard, CSkins, CSkins7, CSounds, CSpectator, CStatboard, CTooltips, and CVoting.
|
protected |
Get the sound interface.
|
protected |
Get the storage interface.
|
protected |
Get the text rendering interface.
|
protected |
Gets the current time.
|
protected |
Get the ui interface.
|
friend |
|
protected |