mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Add Font::ready()
Now we can check if a Font Object is Ready. ( Font Library Loaded )
This commit is contained in:
parent
dcd2d333b8
commit
c7c59975ca
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user