|
HoverRace
2.0
|
The collection of built-in avatars. More...
#include <AvatarGallery.h>
Public Types | |
| using | const_iterator = avatars_t::const_iterator |
| using | iterator = avatars_t::iterator |
| using | value_type = avatars_t::value_type |
Public Member Functions | |
| AvatarGallery (const Util::OS::path_t &path={}) | |
| Constructor. More... | |
| const_iterator | begin () const |
| iterator | begin () |
| const_iterator | end () const |
| iterator | end () |
| std::shared_ptr< Display::Res< Display::Texture > > | FindName (const std::string &s) const |
| Find the avatar for a given name. More... | |
| bool | IsEmpty () const |
| void | Reload () |
| Reload all avatars. More... | |
Static Public Member Functions | |
| static const std::string & | GetDefaultAvatarName () |
| Retrieve the name of the default avatar. More... | |
Private Types | |
| using | avatars_t = std::unordered_map< std::string, std::shared_ptr< Display::Res< Display::Texture >>> |
Private Attributes | |
| avatars_t | avatars |
| Util::OS::path_t | path |
The collection of built-in avatars.
|
private |
| using HoverRace::Player::AvatarGallery::const_iterator = avatars_t::const_iterator |
| using HoverRace::Player::AvatarGallery::iterator = avatars_t::iterator |
| using HoverRace::Player::AvatarGallery::value_type = avatars_t::value_type |
| HoverRace::Player::AvatarGallery::AvatarGallery | ( | const Util::OS::path_t & | path = { } | ) |
Constructor.
| path | The base avatar directory (may be empty to use default). |
|
inline |
|
inline |
|
inline |
|
inline |
| std::shared_ptr< Display::Res< Display::Texture > > HoverRace::Player::AvatarGallery::FindName | ( | const std::string & | s | ) | const |
Find the avatar for a given name.
| s | The avatar name. |
nullptr if not found.
|
static |
Retrieve the name of the default avatar.
|
inline |
| void HoverRace::Player::AvatarGallery::Reload | ( | ) |
Reload all avatars.
|
private |
|
private |
1.8.11