mirror of
https://github.com/edubart/otclient.git
synced 2025-10-18 21:43:26 +02:00
improvements to skins
This commit is contained in:
@@ -38,6 +38,12 @@ void FontManager::terminate()
|
||||
m_defaultFont = nullptr;
|
||||
}
|
||||
|
||||
void FontManager::clearFonts()
|
||||
{
|
||||
m_fonts.clear();
|
||||
m_defaultFont = BitmapFontPtr(new BitmapFont("emptyfont"));
|
||||
}
|
||||
|
||||
bool FontManager::importFont(std::string fontFile)
|
||||
{
|
||||
try {
|
||||
|
@@ -31,6 +31,7 @@ public:
|
||||
FontManager();
|
||||
|
||||
void terminate();
|
||||
void clearFonts();
|
||||
|
||||
bool importFont(std::string fontFile);
|
||||
|
||||
|
@@ -120,7 +120,7 @@ void PainterOGL2::drawCoords(CoordsBuffer& coordsBuffer, DrawMode drawMode)
|
||||
|
||||
void PainterOGL2::drawTextureCoords(CoordsBuffer& coordsBuffer, const TexturePtr& texture)
|
||||
{
|
||||
if(texture->isEmpty())
|
||||
if(texture && texture->isEmpty())
|
||||
return;
|
||||
|
||||
setDrawProgram(m_shaderProgram ? m_shaderProgram : m_drawTexturedProgram.get());
|
||||
|
Reference in New Issue
Block a user