class StockIcons

Inherits: Module<StockIcons>

Provides easy access to variety of icons for use in the engine.

Public

Methods

GetIcon

HSpriteImage GetIcon(StockIcon icon, float size = 8.F) const

Retrieves a particular stock icon.

icon
Icon to retrieve.
size
Size of the icon in points.

GetUnicode

u32 GetUnicode(StockIcon icon) const

Returns the unicode character corresponding to an icon.

GetFont

HFont GetFont(StockIcon icon) const

Returns the font in which the provided icon is stored in.

ParseIconName

StockIcon ParseIconName(const String &name)

Parses an icon name and returns the corresponding enum entry if found.

staticInstance

static T &Instance()

Returns a reference to the module instance.

Module has to have been started up first otherwise an exception will be thrown.

staticInstancePtr

static T *InstancePtr()

Returns a pointer to the module instance.

Module has to have been started up first otherwise an exception will be thrown.

staticShutDown

static void ShutDown()

Shuts down this module and frees any resources it is using.

staticIsStarted

static bool IsStarted()

Query if the module has been started.

Protected

Methods

OnStartUp

void OnStartUp() override

Override if you want your module to be notified once it has been constructed and started.

OnShutDown

void OnShutDown() override

Override if you want your module to be notified just before it is deleted.

~Module<T>

virtual ~Module<T>() = default

staticInstanceInternal

static T *&InstanceInternal()

Returns a singleton instance of this module.

staticIsDestroyed

static bool &IsDestroyed()

Checks has the Module been shut down.

staticIsStartedUp

static bool &IsStartedUp()

Checks has the Module been started up.

Private

Fields

mCache

TUnorderedMap<StockIconKey, TWeakResourceHandle<SpriteImage>> mCache

mNameLookup

UnorderedMap<String, StockIcon> mNameLookup