aboutsummaryrefslogtreecommitdiff
path: root/src/example
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-14 14:37:55 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-14 14:37:55 +0100
commitaa1f1f9460fa713e00fd1830b08be743395110ce (patch)
treebdb8178c283c27cd9b261675822aa6d784dfe23f /src/example
parent86e3dcbc1e5b2fe07d89d6cde21f4b9e687962fa (diff)
sdl_ttf to submodules + feedback changes
Diffstat (limited to 'src/example')
-rw-r--r--src/example/loadfont.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/example/loadfont.cpp b/src/example/loadfont.cpp
index 3cbe559..a52e7f0 100644
--- a/src/example/loadfont.cpp
+++ b/src/example/loadfont.cpp
@@ -15,10 +15,10 @@ int main() {
try {
// Correct way to create a unique pointer for Text
std::unique_ptr<Text> label
- = std::make_unique<Text>(1, vec2(100, 100), vec2(0, 0), "test test", "OpenSymbol");
- std::unique_ptr<Asset> asset = font_facade.get_font_asset(label->font_family);
- std::cout << "path: " << asset->get_path() << std::endl;
- std::unique_ptr<Font> font = std::make_unique<Font>(*asset, mediator);
+ = std::make_unique<Text>(1, vec2(100, 100), vec2(0, 0), "test test", "OpenSymbol",Text::Data{});
+ Asset asset = font_facade.get_font_asset(label->font_family);
+ std::cout << "path: " << asset.get_path() << std::endl;
+ std::unique_ptr<Font> font = std::make_unique<Font>(asset, mediator);
// Get the TTF_Font from the Font object
TTF_Font* ttf_font = font->get_font();