Predefined key class for sf::Font resources. More...
Static Public Member Functions | |
| static FontKey | FromFile (const std::string &fileName, const std::string &tag="") |
| Load sf::Font from file name. | |
| static FontKey | FromMemory (const void *data, std::size_t size, const std::string &tag="") |
| Load sf::Font from file in memory. | |
| static FontKey | FromStream (sf::InputStream &stream, const std::string &tag="") |
| Load sf::Font from input stream. | |
Public Member Functions | |
| MovedPtr< sf::Font, NoCopy > | Load () const |
| Loads the font as specified by the static functions. | |
| void | Swap (FontKey &other) |
| Exchanges the contents of *this with other. | |
Related Functions | |
| bool | thor::Resources::operator< (const FontKey &lhs, const FontKey &rhs) |
| Comparison operator for strict weak ordering. | |
| void | thor::Resources::swap (FontKey &lhs, FontKey &rhs) |
| Swaps two sf::Font resource keys. | |
Predefined key class for sf::Font resources.
You can use this class to specifiy the access and loading of sf::Font resources in a ResourceManager.
| static FontKey thor::Resources::FontKey::FromFile | ( | const std::string & | fileName, |
| const std::string & | tag = "" |
||
| ) | [static] |
Load sf::Font from file name.
| fileName | The name of the file from which you want to load the sf::Font. |
| tag | If an existing key has the same loading parameters, you can use this ID to create a distinct key. |
| static FontKey thor::Resources::FontKey::FromMemory | ( | const void * | data, |
| std::size_t | size, | ||
| const std::string & | tag = "" |
||
| ) | [static] |
Load sf::Font from file in memory.
| data | Pointer to the file data in memory. |
| size | Size of the data to load, in bytes. |
| tag | If an existing key has the same loading parameters, you can use this ID to create a distinct key. |
| static FontKey thor::Resources::FontKey::FromStream | ( | sf::InputStream & | stream, |
| const std::string & | tag = "" |
||
| ) | [static] |
Load sf::Font from input stream.
| stream | Source stream to read from. |
| tag | If an existing key has the same loading parameters, you can use this ID to create a distinct key. |
| MovedPtr<sf::Font, NoCopy> thor::Resources::FontKey::Load | ( | ) | const |
Loads the font as specified by the static functions.
This function is mainly provided for ResourceManager, you don't need to call it directly.