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
|
@ -567,6 +567,11 @@ namespace MiniEngine
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Font::isReady()
|
||||||
|
{
|
||||||
|
return (font.get() != nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
Texture Font::renderText(Renderer rnd, std::string Text, RGBA fg)
|
Texture Font::renderText(Renderer rnd, std::string Text, RGBA fg)
|
||||||
{
|
{
|
||||||
Surface surf;
|
Surface surf;
|
||||||
|
|
|
@ -219,6 +219,7 @@ namespace MiniEngine
|
||||||
Font() = default;
|
Font() = default;
|
||||||
Font(std::string FontFileName, int size) throw(ErrorViewer);
|
Font(std::string FontFileName, int size) throw(ErrorViewer);
|
||||||
int use(std::string FontFileName, int size);
|
int use(std::string FontFileName, int size);
|
||||||
|
bool isReady();
|
||||||
Texture renderText(Renderer rnd, std::string Text, RGBA fg);
|
Texture renderText(Renderer rnd, std::string Text, RGBA fg);
|
||||||
Texture renderTextWrapped(Renderer rnd, std::string Text, RGBA fg, int WrapLength);
|
Texture renderTextWrapped(Renderer rnd, std::string Text, RGBA fg, int WrapLength);
|
||||||
Texture renderTextShaded(Renderer rnd, std::string Text, RGBA fg, RGBA bg);
|
Texture renderTextShaded(Renderer rnd, std::string Text, RGBA fg, RGBA bg);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user