DDraceNetwork Docs
|
#include <skins.h>
Classes | |
class | CLoadingSkin |
class | CSkinDownloadJob |
Public Types | |
typedef std::function< void()> | TSkinLoadedCallback |
Public Member Functions | |
CSkins () | |
int | Sizeof () const override |
void | OnInit () override |
void | OnShutdown () override |
void | Refresh (TSkinLoadedCallback &&SkinLoadedCallback) |
std::chrono::nanoseconds | LastRefreshTime () const |
const std::unordered_map< std::string_view, std::unique_ptr< CSkin > > & | GetSkinsUnsafe () const |
const CSkin * | FindOrNullptr (const char *pName, bool IgnorePrefix=false) |
const CSkin * | Find (const char *pName) |
void | RandomizeSkin (int Dummy) |
Public Member Functions inherited from CComponent | |
virtual | ~CComponent () |
virtual int | Sizeof () const =0 |
class CGameClient * | GameClient () const |
class IClient * | Client () 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 bool | IsVanillaSkin (const char *pName) |
Static Public Attributes | |
static constexpr const char * | VANILLA_SKINS [] |
Private Member Functions | |
const CSkin * | LoadSkin (const char *pName, const char *pPath, int DirType) |
const CSkin * | LoadSkin (const char *pName, CImageInfo &Info) |
const CSkin * | FindImpl (const char *pName) |
Static Private Member Functions | |
static int | SkinScan (const char *pName, int IsDir, int DirType, void *pUser) |
Private Attributes | |
std::unordered_map< std::string_view, std::unique_ptr< CSkin > > | m_Skins |
std::unordered_map< std::string_view, std::unique_ptr< CLoadingSkin > > | m_LoadingSkins |
std::chrono::nanoseconds | m_LastRefreshTime |
CSkin | m_PlaceholderSkin |
char | m_aEventSkinPrefix [MAX_SKIN_LENGTH] |
Additional Inherited Members | |
Protected Member Functions inherited from CComponent | |
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 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 CComponent | |
CGameClient * | m_pClient |
typedef std::function<void()> CSkins::TSkinLoadedCallback |
CSkins::CSkins | ( | ) |
const CSkin * CSkins::Find | ( | const char * | pName | ) |
|
private |
const CSkin * CSkins::FindOrNullptr | ( | const char * | pName, |
bool | IgnorePrefix = false |
||
) |
|
inline |
|
static |
|
inline |
|
private |
|
private |
|
overridevirtual |
Called to let the components run initialization code.
Reimplemented from CComponent.
|
overridevirtual |
Called to cleanup the component. This method is called when the client is closed.
Reimplemented from CComponent.
void CSkins::RandomizeSkin | ( | int | Dummy | ) |
void CSkins::Refresh | ( | TSkinLoadedCallback && | SkinLoadedCallback | ) |
|
inlineoverridevirtual |
Gets the size of the non-abstract component.
Implements CComponent.
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticconstexpr |