add download progress, improbable cloud browser, lock touch when pencil is down on iOS

This commit is contained in:
2018-01-04 00:02:28 +00:00
parent 01370642a1
commit 5feb3acb1d
10 changed files with 120 additions and 37 deletions

View File

@@ -117,11 +117,18 @@ void App::cloud_browse()
async_start();
auto* m = layout[main_id]->add_child<NodeMessageBox>();
m->m_title->set_text("Downloading");
m->m_message->set_text("Download in progress, please wait...");
async_update();
m->m_message->set_text("Download in progress");
async_redraw();
async_end();
download(dialog->selected_file);
download(dialog->selected_file, [this,m](float p){
static char progress[256];
sprintf(progress, "Download in progress %.2f%%", p * 100.f);
async_start();
m->m_message->set_text(progress);
async_redraw();
async_end();
});
async_start();
canvas->reset_camera();
@@ -137,7 +144,7 @@ void App::cloud_browse()
layers->add_layer(canvas->m_canvas->m_layers[i].m_name.c_str());
ActionManager::clear();
m->destroy();
async_update();
async_redraw();
async_end();
}).detach();
};