refactor font loading

This commit is contained in:
2019-12-01 18:24:59 +01:00
parent 0905827b8d
commit c8bce21b95
30 changed files with 180 additions and 84 deletions

View File

@@ -60,7 +60,7 @@ void NodeDialogCloud::load_thumbs_thread()
align->SetAlign(YGAlignCenter);
align->SetJustify(YGJustifyCenter);
auto* text = align->add_child<NodeText>();
text->set_font("arial-30");
text->set_font_size(30);
text->set_text("Connecting to the server...");
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &res);
@@ -138,8 +138,8 @@ void NodeDialogCloud::load_thumbs_thread()
thumb.copy_from((uint8_t*)rgb.data());
auto image_tex = node->find<NodeImageTexture>("thumb-tex");
image_tex->tex.destroy();
image_tex->tex.create(thumb);
image_tex->tex = std::make_shared<Texture2D>();
image_tex->tex->create(thumb);
app_redraw();
}