DDNet documentation
Loading...
Searching...
No Matches
CBackground Class Reference

#include <background.h>

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

Public Member Functions

 CBackground (ERenderType MapType=ERenderType::RENDERTYPE_BACKGROUND_FORCE, bool OnlineOnly=true)
 ~CBackground () override
int Sizeof () const override
void OnInit () override
void OnMapLoad () override
void OnRender () override
void LoadBackground ()
const char * MapName () const
Public Member Functions inherited from CMapLayers
 CMapLayers (ERenderType Type, bool OnlineOnly=true)
int Sizeof () const override
void OnInit () override
void OnRender () override
void OnMapLoad () override
virtual CCamera * GetCurCamera ()
CEnvelopeState & EnvEvaluator ()
Public Member Functions inherited from CComponent
virtual void OnStateChange (int NewState, int OldState)
virtual void OnConsoleInit ()
virtual void OnShutdown ()
virtual void OnReset ()
virtual void OnWindowResize ()
virtual void OnUpdate ()
virtual void OnNewSnapshot ()
virtual void OnRelease ()
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 (std::vector< IInput::CTouchFingerState > &vTouchFingerStates)
Public Member Functions inherited from CComponentInterfaces
virtual void OnInterfacesInit (CGameClient *pClient)
virtual ~CComponentInterfaces ()=default

Protected Attributes

IMap * m_pMap
bool m_Loaded
char m_aMapName [MAX_MAP_LENGTH]
std::unique_ptr< IMap > m_pBackgroundMap
CLayers * m_pBackgroundLayers
CMapImages * m_pBackgroundImages

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

Constructor & Destructor Documentation

◆ CBackground()

CBackground::CBackground ( ERenderType MapType = ERenderType::RENDERTYPE_BACKGROUND_FORCE,
bool OnlineOnly = true )

◆ ~CBackground()

CBackground::~CBackground ( )
override

Member Function Documentation

◆ LoadBackground()

void CBackground::LoadBackground ( )

◆ MapName()

const char * CBackground::MapName ( ) const
inline

◆ OnInit()

void CBackground::OnInit ( )
overridevirtual

Called to let the components run initialization code.

Reimplemented from CComponent.

Reimplemented in CMenuBackground.

◆ OnMapLoad()

void CBackground::OnMapLoad ( )
overridevirtual

Called on map load.

Reimplemented from CComponent.

Reimplemented in CMenuBackground.

◆ OnRender()

void CBackground::OnRender ( )
overridevirtual

Called when the component should get rendered.

The render order depends on the component insertion order.

Reimplemented from CComponent.

Reimplemented in CMenuBackground.

◆ Sizeof()

int CBackground::Sizeof ( ) const
inlineoverridevirtual

Gets the size of the non-abstract component.

Implements CComponent.

Reimplemented in CMenuBackground.

Member Data Documentation

◆ m_aMapName

char CBackground::m_aMapName[MAX_MAP_LENGTH]
protected

◆ m_Loaded

bool CBackground::m_Loaded
protected

◆ m_pBackgroundImages

CMapImages* CBackground::m_pBackgroundImages
protected

◆ m_pBackgroundLayers

CLayers* CBackground::m_pBackgroundLayers
protected

◆ m_pBackgroundMap

std::unique_ptr<IMap> CBackground::m_pBackgroundMap
protected

◆ m_pMap

IMap* CBackground::m_pMap
protected

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