diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-17 15:14:32 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-17 15:14:32 +0100 |
commit | e1e7ead5df44383c78c8da65fc5916be13d111b6 (patch) | |
tree | dfe2118fef4c12ad0d233710f8ad938623b91451 /src/example/loadfont.cpp | |
parent | c3c565f7c8d1e7e9899b8c2fbb1c313a45e4b10b (diff) |
feedback changes
Diffstat (limited to 'src/example/loadfont.cpp')
-rw-r--r-- | src/example/loadfont.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/example/loadfont.cpp b/src/example/loadfont.cpp index 78b3adb..788fac4 100644 --- a/src/example/loadfont.cpp +++ b/src/example/loadfont.cpp @@ -3,6 +3,7 @@ #include <crepe/api/Text.h> #include <crepe/facade/Font.h> #include <crepe/facade/SDLContext.h> +#include <crepe/facade/FontFacade.h> #include <crepe/manager/Mediator.h> #include <crepe/manager/ResourceManager.h> #include <exception> @@ -14,15 +15,17 @@ int main() { // SDLFontContext font_facade; Mediator mediator; + FontFacade font_facade{}; SDLContext sdl_context{mediator}; // ComponentManager component_manager{mediator}; ResourceManager resource_manager{mediator}; 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), "OpenSymbol", Text::Data{}, "test text", Asset("")); + 1, vec2(100, 100), vec2(0, 0), "OpenSymbol", Text::Data{}, "test text"); // std::cout << "Path: " << label->font.get_path() << std::endl; - + Asset asset1 = font_facade.get_font_asset("OpenSymbol"); + std::cout << asset1.get_path() << std::endl; std::unique_ptr<Text> label2 = std::make_unique<Text>( 1, vec2(100, 100), vec2(0, 0), "fsaafdafsdafsdafsdasfdds", Text::Data{}); Asset asset = Asset("test test"); |