refactor font loading
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user