aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/font.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/facade/font.h')
-rw-r--r--src/crepe/facade/font.h24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/crepe/facade/font.h b/src/crepe/facade/font.h
index f5c7785..a8d8040 100644
--- a/src/crepe/facade/font.h
+++ b/src/crepe/facade/font.h
@@ -12,36 +12,20 @@ namespace crepe {
*
* This class is a wrapper around an SDL_ttf font instance, encapsulating font loading and usage.
*/
-class Font {
+class Font : public Resource{
public:
/**
- * \param src The file path to the font file.
- */
- Font(const char* src);
-
- /**
* \param res A unique pointer to an Asset holding the font resource.
*/
- Font(std::unique_ptr<Asset> res);
+ Font(const Asset & src, Mediator & mediator);
/**
* \brief Destructor to clean up font resources.
*/
~Font() = default;
-
- void draw(const vec2& pos, const vec2&)
-private:
- /**
- * \brief Load the font from the given resource.
- *
- * This method is used by both constructors to load the font resource.
- *
- * \param res A unique pointer to an Asset holding the font resource.
- */
- void load(std::unique_ptr<Asset> res);
-
private:
- std::unique_ptr<TTF_Font, decltype(&TTF_CloseFont)> font; ///< The SDL_ttf font object with custom deleter.
+ //! The SDL_ttf font object with custom deleter.
+ std::unique_ptr<TTF_Font, decltype(&TTF_CloseFont)> font;
};
} // namespace crepe