![]() |
DDraceNetwork Documentation
|
#include <component.h>
Public Member Functions | |
| virtual | ~CComponent ()=default |
| virtual int | Sizeof () const =0 |
| virtual void | OnStateChange (int NewState, int OldState) |
| virtual void | OnConsoleInit () |
| virtual void | OnInit () |
| virtual void | OnShutdown () |
| virtual void | OnReset () |
| virtual void | OnWindowResize () |
| virtual void | OnUpdate () |
| 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) |
| virtual bool | OnTouchState (const std::vector< IInput::CTouchFingerState > &vTouchFingerStates) |
Public Member Functions inherited from CComponentInterfaces | |
| virtual void | OnInterfacesInit (CGameClient *pClient) |
| virtual | ~CComponentInterfaces ()=default |
Additional Inherited Members | |
Protected Member Functions inherited from CComponentInterfaces | |
| class CGameClient * | GameClient () const |
| class IClient * | Client () const |
| 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 CRenderMap * | RenderMap () 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 |
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.
|
virtualdefault |
The component virtual destructor.
Called to let the components register their console commands.
Reimplemented in CBinds, CCamera, CChat, CGameConsole, CControls, CEmoticon, CGhost, CScoreboard, CSkins, 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.
Called to let the components run initialization code.
Reimplemented in CBackground, CChat, CGameConsole, CCountryFlags, CDamageInd, CHud, CInfoMessages, CItems, CMapImages, CMapLayers, CMenuBackground, CMenus, CParticles, CPlayers, CScoreboard, CSkins, CSkins7, CSounds, and CTouchControls.
|
inlinevirtual |
Called on a input event.
| Event | The input event. |
Reimplemented in CBinds::CBindsSpecial, CBinds, CChat, CGameConsole, CEmoticon, CMenusKeyBinder, CMenus, CMotd, and CSpectator.
Called on map load.
Reimplemented in CBackground, CGhost, CMapImages, CMapLayers, CMapSounds, CMenuBackground, and CRaceDemo.
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.
Called when the input gets released, for example when a text box loses focus.
Reimplemented in CChat, CEmoticon, CScoreboard, CSpectator, and CStatboard.
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_EXPLOSIONS >, CParticles::CRenderGroup< GROUP_EXTRA >, CParticles::CRenderGroup< GROUP_GENERAL >, CParticles::CRenderGroup< GROUP_PROJECTILE_TRAIL >, CParticles::CRenderGroup< GROUP_TRAIL_EXTRA >, CPlayers, CScoreboard, CSounds, CSpectator, CStatboard, CTooltips, and CTouchControls.
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, CTouchControls, and CVoting.
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 with all current touch finger states.
| vTouchFingerStates | The touch finger states to be handled. |
true if the component used the touch events, false otherwise. Reimplemented in CTouchControls.
Called when the component should get updated.
The update order depends on the component insertion order.
Reimplemented in CSkins.
Called when the window has been resized.
Reimplemented in CBroadcast, CChat, CHud, CInfoMessages, CMenus, CMotd, CNamePlates, and CTouchControls.
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_EXPLOSIONS >, CParticles::CRenderGroup< GROUP_EXTRA >, CParticles::CRenderGroup< GROUP_GENERAL >, CParticles::CRenderGroup< GROUP_PROJECTILE_TRAIL >, CParticles::CRenderGroup< GROUP_TRAIL_EXTRA >, CPlayers, CRaceDemo, CScoreboard, CSkins, CSkins7, CSounds, CSpectator, CStatboard, CTooltips, CTouchControls, and CVoting.