Rev | Line | |
---|
[9781] | 1 | /*! |
---|
[9837] | 2 | * @file resource_font.h |
---|
| 3 | * @brief Contains the ResourceFont class, that handles the Resource-specific loading part of the Font. |
---|
[9781] | 4 | * |
---|
| 5 | */ |
---|
| 6 | |
---|
[9837] | 7 | #ifndef _RESOURCE_FONT_H |
---|
| 8 | #define _RESOURCE_FONT_H |
---|
[9781] | 9 | |
---|
| 10 | #include "util/loading/resource.h" |
---|
[9837] | 11 | #include "font.h" |
---|
[9781] | 12 | |
---|
| 13 | |
---|
[9847] | 14 | class ResourceFont : public Font, public Resources::Resource |
---|
[9781] | 15 | { |
---|
[9785] | 16 | public: |
---|
[9854] | 17 | ResourceFont(const std::string& fontName, unsigned int renderSize, const Resources::KeepLevel& keepLevel = Resources::KeepLevel()); |
---|
| 18 | static ResourceFont createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel = Resources::KeepLevel()); |
---|
[9781] | 19 | |
---|
| 20 | private: |
---|
[9837] | 21 | class FontResourcePointer : public Resources::StorePointer |
---|
[9781] | 22 | { |
---|
| 23 | public: |
---|
[9837] | 24 | FontResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const FontData::Pointer& data); |
---|
| 25 | inline const FontData::Pointer& ptr() const { return pointer; } |
---|
[9846] | 26 | virtual bool last() const { return pointer.count() == 1; } |
---|
| 27 | private: |
---|
[9837] | 28 | FontData::Pointer pointer; |
---|
[9781] | 29 | }; |
---|
| 30 | |
---|
[9785] | 31 | private: |
---|
[9837] | 32 | static Resources::tType<ResourceFont> type; |
---|
[9781] | 33 | }; |
---|
| 34 | |
---|
| 35 | |
---|
[9837] | 36 | #endif /* _RESOURCE_FONT_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.