diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-17 13:34:19 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-17 13:34:19 +0100 |
commit | 69ca7fdd738fd4ed98aefc07bab5a43486a55619 (patch) | |
tree | d4c13778166d0ae0a038ca067a64b570df73ffb2 /src/example/loadfont.cpp | |
parent | 34a773eb0f01379419900a3fe26527702146b890 (diff) |
final changes
Diffstat (limited to 'src/example/loadfont.cpp')
-rw-r--r-- | src/example/loadfont.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/example/loadfont.cpp b/src/example/loadfont.cpp index 36d00dd..ed67ffa 100644 --- a/src/example/loadfont.cpp +++ b/src/example/loadfont.cpp @@ -1,14 +1,14 @@ #include <SDL2/SDL_ttf.h> +#include <crepe/api/Asset.h> #include <crepe/api/Text.h> #include <crepe/facade/Font.h> #include <crepe/facade/SDLContext.h> -#include <crepe/api/Asset.h> #include <crepe/manager/Mediator.h> #include <crepe/manager/ResourceManager.h> #include <exception> #include <iostream> -#include <optional> #include <memory> +#include <optional> using namespace crepe; int main() { @@ -20,11 +20,11 @@ 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), "OpenSymbol", Text::Data{},"test text", Asset("")); + 1, vec2(100, 100), vec2(0, 0), "OpenSymbol", Text::Data{}, "test text", Asset("")); // std::cout << "Path: " << label->font.get_path() << std::endl; - std::unique_ptr<Text> label2 - = std::make_unique<Text>(1, vec2(100, 100), vec2(0, 0),"fsaafdafsdafsdafsdasfdds", Text::Data{}); + std::unique_ptr<Text> label2 = std::make_unique<Text>( + 1, vec2(100, 100), vec2(0, 0), "fsaafdafsdafsdafsdasfdds", Text::Data{}); Asset asset = Asset("test test"); label->font = asset; std::cout << label->font.value().get_path() << std::endl; |