![]() |
DDNet documentation
|
#include <menu_background.h>
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_CREDITS , POS_SETTINGS_RESERVED0 , 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 } |
| enum | { POS_BROWSER_CUSTOM_NUM = (POS_BROWSER_CUSTOM4 - POS_BROWSER_CUSTOM0) + 1 , POS_SETTINGS_RESERVED_NUM = 1 , POS_RESERVED_NUM = (POS_RESERVED2 - POS_RESERVED0) + 1 } |
| enum | { PREDEFINED_THEMES_COUNT = 3 } |
Public Member Functions | |
| CMenuBackground () | |
| int | Sizeof () const override |
| void | OnInterfacesInit (CGameClient *pClient) override |
| void | OnInit () override |
| void | OnMapLoad () override |
| void | OnRender () override |
| void | LoadMenuBackground (bool HasDayHint=true, bool HasNightHint=true) |
| bool | Render () |
| bool | IsLoading () const |
| class CCamera * | GetCurCamera () override |
| void | ChangePosition (int PositionNumber) |
| std::vector< CTheme > & | GetThemes () |
| Public Member Functions inherited from CBackground | |
| CBackground (ERenderType MapType=ERenderType::RENDERTYPE_BACKGROUND_FORCE, bool OnlineOnly=true) | |
| ~CBackground () override | |
| void | LoadBackground () |
| const char * | MapName () const |
| Public Member Functions inherited from CMapLayers | |
| CMapLayers (ERenderType Type, bool OnlineOnly=true) | |
| 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 | ~CComponentInterfaces ()=default |
Private Member Functions | |
| void | ResetPositions () |
| void | LoadThemeIcon (CTheme &Theme) |
Static Private Member Functions | |
| static int | ThemeScan (const char *pName, int IsDir, int DirType, void *pUser) |
Private Attributes | |
| std::chrono::nanoseconds | m_ThemeScanStartTime {0} |
| CCamera | m_Camera |
| vec2 | m_RotationCenter |
| std::array< vec2, NUM_POS > | m_aPositions |
| int | m_CurrentPosition |
| vec2 | m_CurrentDirection = vec2(1.0f, 0.0f) |
| vec2 | m_AnimationStartPos |
| bool | m_ChangedPosition |
| float | m_MoveTime |
| bool | m_IsInit |
| bool | m_Loading |
| std::vector< CTheme > | m_vThemes |
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 |
| Protected Attributes inherited from CBackground | |
| IMap * | m_pMap |
| bool | m_Loaded |
| char | m_aMapName [MAX_MAP_LENGTH] |
| std::unique_ptr< IMap > | m_pBackgroundMap |
| CLayers * | m_pBackgroundLayers |
| CMapImages * | m_pBackgroundImages |
| anonymous enum |
| CMenuBackground::CMenuBackground | ( | ) |
| void CMenuBackground::ChangePosition | ( | int | PositionNumber | ) |
|
overridevirtual |
Reimplemented from CMapLayers.
| std::vector< CTheme > & CMenuBackground::GetThemes | ( | ) |
|
inline |
| void CMenuBackground::LoadMenuBackground | ( | bool | HasDayHint = true, |
| bool | HasNightHint = true ) |
|
private |
|
overridevirtual |
Called to let the components run initialization code.
Reimplemented from CBackground.
|
overridevirtual |
Reimplemented from CComponentInterfaces.
|
overridevirtual |
Called on map load.
Reimplemented from CBackground.
|
overridevirtual |
Called when the component should get rendered.
The render order depends on the component insertion order.
Reimplemented from CBackground.
| bool CMenuBackground::Render | ( | ) |
|
private |
|
inlineoverridevirtual |
Gets the size of the non-abstract component.
Reimplemented from CBackground.
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |