DDraceNetwork Docs
CMenuBackground Class Reference

#include <menu_background.h>

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

Public Types

enum  {
  POS_START = 0 , POS_DEMOS , POS_NEWS , POS_SETTINGS_LANGUAGE ,
  POS_SETTINGS_GENERAL , POS_SETTINGS_PLAYER , POS_SETTINGS_TEE , POS_SETTINGS_APPEARANCE ,
  POS_SETTINGS_CONTROLS , POS_SETTINGS_GRAPHICS , POS_SETTINGS_SOUND , POS_SETTINGS_DDNET ,
  POS_SETTINGS_ASSETS , POS_SETTINGS_RESERVED0 , POS_SETTINGS_RESERVED1 , POS_BROWSER_INTERNET ,
  POS_BROWSER_LAN , POS_BROWSER_FAVORITES , POS_BROWSER_CUSTOM0 , POS_BROWSER_CUSTOM1 ,
  POS_BROWSER_CUSTOM2 , POS_BROWSER_CUSTOM3 , POS_BROWSER_CUSTOM4 , POS_RESERVED0 ,
  POS_RESERVED1 , POS_RESERVED2 , NUM_POS , POS_BROWSER_CUSTOM_NUM = (POS_BROWSER_CUSTOM4 - POS_BROWSER_CUSTOM0) + 1 ,
  POS_SETTINGS_RESERVED_NUM = (POS_SETTINGS_RESERVED1 - POS_SETTINGS_RESERVED0) + 1 , POS_RESERVED_NUM = (POS_RESERVED2 - POS_RESERVED0) + 1
}
 
enum  { PREDEFINED_THEMES_COUNT = 3 }
 
- Public Types inherited from CMapLayers
enum  {
  TYPE_BACKGROUND = 0 , TYPE_BACKGROUND_FORCE , TYPE_FOREGROUND , TYPE_FULL_DESIGN ,
  TYPE_ALL = -1
}
 

Public Member Functions

CBackgroundEngineMapCreateBGMap () override
 
void ResetPositions ()
 
void LoadThemeIcon (CTheme &Theme)
 
 CMenuBackground ()
 
 ~CMenuBackground () override
 
virtual int Sizeof () const override
 
void OnInit () override
 
void OnMapLoad () override
 
void OnRender () override
 
void LoadMenuBackground (bool HasDayHint=true, bool HasNightHint=true)
 
bool Render ()
 
class CCameraGetCurCamera () override
 
void ChangePosition (int PositionNumber)
 
std::vector< CTheme > & GetThemes ()
 
- Public Member Functions inherited from CBackground
 CBackground (int MapType=CMapLayers::TYPE_BACKGROUND_FORCE, bool OnlineOnly=true)
 
virtual ~CBackground ()
 
virtual int Sizeof () const override
 
virtual void OnInit () override
 
virtual void OnMapLoad () override
 
virtual void OnRender () override
 
void LoadBackground ()
 
const char * MapName () const
 
- Public Member Functions inherited from CMapLayers
 CMapLayers (int Type, bool OnlineOnly=true)
 
virtual ~CMapLayers ()
 
virtual int Sizeof () const override
 
virtual void OnInit () override
 
virtual void OnRender () override
 
virtual void OnMapLoad () override
 
- 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)
 

Static Public Member Functions

static int ThemeScan (const char *pName, int IsDir, int DirType, void *pUser)
 
- Static Public Member Functions inherited from CMapLayers
static void EnvelopeEval (int TimeOffsetMillis, int Env, ColorRGBA &Result, size_t Channels, void *pUser)
 

Public Attributes

CCamera m_Camera
 
vec2 m_RotationCenter
 
std::array< vec2, NUM_POSm_aPositions
 
int m_CurrentPosition
 
vec2 m_CurrentDirection = vec2(1.0f, 0.0f)
 
vec2 m_AnimationStartPos
 
bool m_ChangedPosition
 
float m_MoveTime
 
bool m_IsInit
 
std::vector< CThemem_vThemes
 

Protected Member Functions

bool CanRenderMenuBackground () override
 
virtual CBackgroundEngineMapCreateBGMap ()
 
virtual bool CanRenderMenuBackground ()
 
- 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
 

Private Attributes

std::chrono::nanoseconds m_ThemeScanStartTime {0}
 

Additional Inherited Members

- Protected Attributes inherited from CBackground
IEngineMapm_pMap
 
bool m_Loaded
 
char m_aMapName [MAX_MAP_LENGTH]
 
CBackgroundEngineMapm_pBackgroundMap
 
CLayersm_pBackgroundLayers
 
CMapImagesm_pBackgroundImages
 
- Protected Attributes inherited from CComponent
CGameClientm_pClient
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
POS_START 
POS_DEMOS 
POS_NEWS 
POS_SETTINGS_LANGUAGE 
POS_SETTINGS_GENERAL 
POS_SETTINGS_PLAYER 
POS_SETTINGS_TEE 
POS_SETTINGS_APPEARANCE 
POS_SETTINGS_CONTROLS 
POS_SETTINGS_GRAPHICS 
POS_SETTINGS_SOUND 
POS_SETTINGS_DDNET 
POS_SETTINGS_ASSETS 
POS_SETTINGS_RESERVED0 
POS_SETTINGS_RESERVED1 
POS_BROWSER_INTERNET 
POS_BROWSER_LAN 
POS_BROWSER_FAVORITES 
POS_BROWSER_CUSTOM0 
POS_BROWSER_CUSTOM1 
POS_BROWSER_CUSTOM2 
POS_BROWSER_CUSTOM3 
POS_BROWSER_CUSTOM4 
POS_RESERVED0 
POS_RESERVED1 
POS_RESERVED2 
NUM_POS 
POS_BROWSER_CUSTOM_NUM 
POS_SETTINGS_RESERVED_NUM 
POS_RESERVED_NUM 

◆ anonymous enum

anonymous enum
Enumerator
PREDEFINED_THEMES_COUNT 

Constructor & Destructor Documentation

◆ CMenuBackground()

CMenuBackground::CMenuBackground ( )

◆ ~CMenuBackground()

CMenuBackground::~CMenuBackground ( )
inlineoverride

Member Function Documentation

◆ CanRenderMenuBackground()

bool CMenuBackground::CanRenderMenuBackground ( )
inlineoverrideprotectedvirtual

Reimplemented from CMapLayers.

◆ ChangePosition()

void CMenuBackground::ChangePosition ( int  PositionNumber)

◆ CreateBGMap()

CBackgroundEngineMap * CMenuBackground::CreateBGMap ( )
overridevirtual

Reimplemented from CBackground.

◆ GetCurCamera()

CCamera * CMenuBackground::GetCurCamera ( )
overridevirtual

Reimplemented from CMapLayers.

◆ GetThemes()

std::vector< CTheme > & CMenuBackground::GetThemes ( )

◆ LoadMenuBackground()

void CMenuBackground::LoadMenuBackground ( bool  HasDayHint = true,
bool  HasNightHint = true 
)

◆ LoadThemeIcon()

void CMenuBackground::LoadThemeIcon ( CTheme Theme)

◆ OnInit()

void CMenuBackground::OnInit ( )
overridevirtual

Called to let the components run initialization code.

Reimplemented from CBackground.

◆ OnMapLoad()

void CMenuBackground::OnMapLoad ( )
overridevirtual

Called on map load.

Reimplemented from CBackground.

◆ OnRender()

void CMenuBackground::OnRender ( )
overridevirtual

Called when the component should get rendered.

The render order depends on the component insertion order.

Reimplemented from CBackground.

◆ Render()

bool CMenuBackground::Render ( )

◆ ResetPositions()

void CMenuBackground::ResetPositions ( )

◆ Sizeof()

virtual int CMenuBackground::Sizeof ( ) const
inlineoverridevirtual

Gets the size of the non-abstract component.

Reimplemented from CBackground.

◆ ThemeScan()

int CMenuBackground::ThemeScan ( const char *  pName,
int  IsDir,
int  DirType,
void *  pUser 
)
static

Member Data Documentation

◆ m_AnimationStartPos

vec2 CMenuBackground::m_AnimationStartPos

◆ m_aPositions

std::array<vec2, NUM_POS> CMenuBackground::m_aPositions

◆ m_Camera

CCamera CMenuBackground::m_Camera

◆ m_ChangedPosition

bool CMenuBackground::m_ChangedPosition

◆ m_CurrentDirection

vec2 CMenuBackground::m_CurrentDirection = vec2(1.0f, 0.0f)

◆ m_CurrentPosition

int CMenuBackground::m_CurrentPosition

◆ m_IsInit

bool CMenuBackground::m_IsInit

◆ m_MoveTime

float CMenuBackground::m_MoveTime

◆ m_RotationCenter

vec2 CMenuBackground::m_RotationCenter

◆ m_ThemeScanStartTime

std::chrono::nanoseconds CMenuBackground::m_ThemeScanStartTime {0}
private

◆ m_vThemes

std::vector<CTheme> CMenuBackground::m_vThemes

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