aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/font.h
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-10 13:40:42 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-10 13:40:42 +0100
commitd80c98ee03e59e0c38e025a7fe83ab4c39115fb8 (patch)
treec31c861b82d384e64071b4e7f64dfafe99b888c0 /src/crepe/facade/font.h
parentb2c72ee8ce282bb13b0fbeb2ddb01fdfd6ad1280 (diff)
parent7a8657dfe019104aced61a5b63e63f61ad919f7a (diff)
font progress
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