mirror of
https://github.com/edubart/otclient.git
synced 2025-12-03 00:16:50 +01:00
reorganize modules
This commit is contained in:
@@ -76,7 +76,7 @@ void Font::renderText(const std::string& text,
|
||||
const Color& color)
|
||||
{
|
||||
// prevent glitches from invalid rects
|
||||
if(!screenCoords.isValid())
|
||||
if(!screenCoords.isValid() || !m_texture)
|
||||
return;
|
||||
|
||||
int textLenght = text.length();
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
|
||||
FontManager g_fonts;
|
||||
|
||||
FontManager::FontManager()
|
||||
{
|
||||
m_defaultFont = FontPtr(new Font("emptyfont"));
|
||||
}
|
||||
|
||||
void FontManager::releaseFonts()
|
||||
{
|
||||
m_defaultFont.reset();
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
class FontManager
|
||||
{
|
||||
public:
|
||||
FontManager();
|
||||
|
||||
/// Release fonts references, thus making possible to destruct them
|
||||
void releaseFonts();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user