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

#include <countryflags.h>

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

Classes

class  CCountryFlag

Public Member Functions

int Sizeof () const override
void OnInit () override
size_t Num () const
const CCountryFlag & GetByCountryCode (int CountryCode) const
const CCountryFlag & GetByIndex (size_t Index) const
void Render (const CCountryFlag &Flag, ColorRGBA Color, float x, float y, float w, float h)
void Render (int CountryCode, ColorRGBA Color, float x, float y, float w, float h)
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 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 (std::vector< IInput::CTouchFingerState > &vTouchFingerStates)
Public Member Functions inherited from CComponentInterfaces
virtual void OnInterfacesInit (CGameClient *pClient)
virtual ~CComponentInterfaces ()=default

Private Member Functions

void LoadCountryflagsIndexfile ()

Static Private Member Functions

static bool ValidateCountryCodeString (const char *pString)

Private Attributes

std::vector< CCountryFlag > m_vCountryFlags
size_t m_aCountryCodeToIndexTable [CountryCode::MAXIMUM - CountryCode::MINIMUM+1]
int m_FlagsQuadContainerIndex

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

Member Function Documentation

◆ GetByCountryCode()

const CCountryFlags::CCountryFlag & CCountryFlags::GetByCountryCode ( int CountryCode) const

◆ GetByIndex()

const CCountryFlags::CCountryFlag & CCountryFlags::GetByIndex ( size_t Index) const

◆ LoadCountryflagsIndexfile()

void CCountryFlags::LoadCountryflagsIndexfile ( )
private

◆ Num()

size_t CCountryFlags::Num ( ) const

◆ OnInit()

void CCountryFlags::OnInit ( )
overridevirtual

Called to let the components run initialization code.

Reimplemented from CComponent.

◆ Render() [1/2]

void CCountryFlags::Render ( const CCountryFlag & Flag,
ColorRGBA Color,
float x,
float y,
float w,
float h )

◆ Render() [2/2]

void CCountryFlags::Render ( int CountryCode,
ColorRGBA Color,
float x,
float y,
float w,
float h )

◆ Sizeof()

int CCountryFlags::Sizeof ( ) const
inlineoverridevirtual

Gets the size of the non-abstract component.

Implements CComponent.

◆ ValidateCountryCodeString()

bool CCountryFlags::ValidateCountryCodeString ( const char * pString)
staticprivate

Member Data Documentation

◆ m_aCountryCodeToIndexTable

size_t CCountryFlags::m_aCountryCodeToIndexTable[CountryCode::MAXIMUM - CountryCode::MINIMUM+1]
private

◆ m_FlagsQuadContainerIndex

int CCountryFlags::m_FlagsQuadContainerIndex
private

◆ m_vCountryFlags

std::vector<CCountryFlag> CCountryFlags::m_vCountryFlags
private

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