diff --git a/MiniEngine.cpp b/MiniEngine.cpp index 7069156..886307a 100644 --- a/MiniEngine.cpp +++ b/MiniEngine.cpp @@ -566,6 +566,11 @@ namespace MiniEngine font.reset(temp, TTF_CloseFont); return 0; } + + bool Font::isReady() + { + return (font.get() != nullptr); + } Texture Font::renderText(Renderer rnd, std::string Text, RGBA fg) { diff --git a/MiniEngine.h b/MiniEngine.h index cac60d0..c809e86 100644 --- a/MiniEngine.h +++ b/MiniEngine.h @@ -219,6 +219,7 @@ namespace MiniEngine Font() = default; Font(std::string FontFileName, int size) throw(ErrorViewer); int use(std::string FontFileName, int size); + bool isReady(); Texture renderText(Renderer rnd, std::string Text, RGBA fg); Texture renderTextWrapped(Renderer rnd, std::string Text, RGBA fg, int WrapLength); Texture renderTextShaded(Renderer rnd, std::string Text, RGBA fg, RGBA bg);