Loading...
Searching...
No Matches
ml::Avatar Class Reference

#include <Malena/Graphics/Controls/Avatar.h>

Inheritance diagram for ml::Avatar:
[legend]

Public Member Functions

 Avatar ()
sf::FloatRect getGlobalBounds () const override
sf::Vector2f getPosition () const override
void setAvatarSize (float px)
void setColorSeed (std::size_t seed)
 Force the tile colour by seed instead of the name hash.
void setInitialsColor (const sf::Color &c)
void setName (const std::string &name)
void setPalette (std::vector< sf::Color > palette)
void setPosition (const sf::Vector2f &position) override
void setPresence (bool present)
 Show/hide the corner presence dot.
void setPresenceColor (const sf::Color &c)

Static Public Member Functions

static std::string initialsOf (const std::string &name)
 Two-letter initials from a display name (first + last word, else first char).

Detailed Description

Definition at line 23 of file Avatar.h.

Constructor & Destructor Documentation

◆ Avatar()

ml::Avatar::Avatar ( )
inline

Definition at line 60 of file Avatar.h.

Member Function Documentation

◆ getGlobalBounds()

sf::FloatRect ml::Avatar::getGlobalBounds ( ) const
inlineoverride

Definition at line 104 of file Avatar.h.

◆ getPosition()

sf::Vector2f ml::Avatar::getPosition ( ) const
inlineoverride

Definition at line 103 of file Avatar.h.

◆ initialsOf()

std::string ml::Avatar::initialsOf ( const std::string & name)
inlinestatic

Two-letter initials from a display name (first + last word, else first char).

Definition at line 74 of file Avatar.h.

◆ setAvatarSize()

void ml::Avatar::setAvatarSize ( float px)
inline

Definition at line 96 of file Avatar.h.

◆ setColorSeed()

void ml::Avatar::setColorSeed ( std::size_t seed)
inline

Force the tile colour by seed instead of the name hash.

Definition at line 94 of file Avatar.h.

◆ setInitialsColor()

void ml::Avatar::setInitialsColor ( const sf::Color & c)
inline

Definition at line 97 of file Avatar.h.

◆ setName()

void ml::Avatar::setName ( const std::string & name)
inline

Definition at line 86 of file Avatar.h.

◆ setPalette()

void ml::Avatar::setPalette ( std::vector< sf::Color > palette)
inline

Definition at line 95 of file Avatar.h.

◆ setPosition()

void ml::Avatar::setPosition ( const sf::Vector2f & position)
inlineoverride

Definition at line 102 of file Avatar.h.

◆ setPresence()

void ml::Avatar::setPresence ( bool present)
inline

Show/hide the corner presence dot.

Definition at line 99 of file Avatar.h.

◆ setPresenceColor()

void ml::Avatar::setPresenceColor ( const sf::Color & c)
inline

Definition at line 100 of file Avatar.h.


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