diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-17 13:33:53 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-17 13:33:53 +0100 |
commit | 34a773eb0f01379419900a3fe26527702146b890 (patch) | |
tree | 6b8d1db513bb16dcdeb1928dcc374967cd9f7089 /src/crepe/system/RenderSystem.cpp | |
parent | 707db8c94b6bb3921105f40658aab13511d8df07 (diff) |
last changes
Diffstat (limited to 'src/crepe/system/RenderSystem.cpp')
-rw-r--r-- | src/crepe/system/RenderSystem.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp index 18f6393..5fc98a9 100644 --- a/src/crepe/system/RenderSystem.cpp +++ b/src/crepe/system/RenderSystem.cpp @@ -152,16 +152,15 @@ void RenderSystem::render() { void RenderSystem::render_text(Text & text, const Transform & tm) { SDLContext & ctx = this->mediator.sdl_context; - // Check if font is available in text if (!text.font.has_value()) { + text.font = ctx.get_font_from_name(text.font_family); } ResourceManager & resource_manager = this->mediator.resource_manager; - if (text.font.has_value()) { + if (!text.font.has_value()) {return;} const Asset& font_asset = text.font.value(); const Font & res = resource_manager.get<Font>(font_asset); - } } |