add message when failed to load thumbs from cloud

This commit is contained in:
2017-11-14 09:31:12 +00:00
parent 0d3431a9de
commit 7564d11570
6 changed files with 76 additions and 4 deletions

View File

@@ -23,9 +23,20 @@ void NodeText::clone_copy(Node* dest) const
void NodeText::create()
{
char font[64];
sprintf(font, "%s-%d", m_font.c_str(), m_font_size);
font_id = (kFont)const_hash(font);
if (!m_font.empty())
{
char font[64];
sprintf(font, "%s-%d", m_font.c_str(), m_font_size);
font_id = (kFont)const_hash(font);
m_text_mesh.create();
m_text_mesh.update(font_id, m_text.c_str());
SetSize(m_text_mesh.bb);
}
}
void NodeText::set_font(kFont fontID)
{
font_id = fontID;
m_text_mesh.create();
m_text_mesh.update(font_id, m_text.c_str());
SetSize(m_text_mesh.bb);