update Xcode and android projects
This commit is contained in:
@@ -34,6 +34,7 @@ bool Asset::exist(std::string path, bool is_asset)
|
||||
std::ifstream f(path);
|
||||
return f.is_open();
|
||||
}
|
||||
return false; // useless return for the stupid xcode
|
||||
}
|
||||
|
||||
std::vector<std::string> Asset::list_files(std::string folder, bool is_asset, const std::string& filter_regex)
|
||||
|
||||
@@ -941,7 +941,7 @@ void ui::Canvas::export_equirectangular_thread(std::string file_path)
|
||||
//int ret = stbi_write_png(name, m_latlong.getWidth(), m_latlong.getHeight(), 4, latlong_data.get(), m_latlong.stride());
|
||||
#ifdef __IOS__
|
||||
[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
|
||||
NSURL* url = [NSURL fileURLWithPath:[NSString stringWithUTF8String:name]];
|
||||
NSURL* url = [NSURL fileURLWithPath:[NSString stringWithUTF8String:file_path.c_str()]];
|
||||
PHAssetChangeRequest *changeRequest = [PHAssetChangeRequest creationRequestForAssetFromImageAtFileURL:url];
|
||||
changeRequest.creationDate = [NSDate date];
|
||||
} completionHandler:^(BOOL success, NSError *error) {
|
||||
|
||||
@@ -37,36 +37,6 @@ void NodeDialogCloud::init_controls()
|
||||
};
|
||||
container = find<Node>("files-list");
|
||||
std::thread(&NodeDialogCloud::load_thumbs_thread, this).detach();
|
||||
/*
|
||||
auto names = Asset::list_files(data_path, false, ".*\\.pano");
|
||||
for (const auto& n : names)
|
||||
{
|
||||
auto node = new NodeDialogCloudItem;
|
||||
node->m_manager = m_manager;
|
||||
node->init();
|
||||
node->m_text->set_text(n.c_str());
|
||||
node->m_path = data_path + "/" + n;
|
||||
node->m_file_name = n;
|
||||
node->on_selected = [&](NodeDialogCloudItem* target) {
|
||||
if (target == current)
|
||||
return;
|
||||
selected_path = target->m_path;
|
||||
selected_file = target->m_file_name;
|
||||
selected_name = selected_file.substr(0, selected_file.length() - 5);
|
||||
if (current)
|
||||
current->m_selected = false;
|
||||
current = target;
|
||||
};
|
||||
|
||||
// load thumb
|
||||
ui::Image thumb = ui::Canvas::I->thumbnail_read(node->m_path);
|
||||
auto image_tex = node->find<NodeImageTexture>("thumb-tex");
|
||||
image_tex->tex.destroy();
|
||||
image_tex->tex.create(thumb);
|
||||
|
||||
container->add_child(node);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void NodeDialogCloud::loaded()
|
||||
@@ -131,6 +101,7 @@ void NodeDialogCloud::load_thumbs_thread()
|
||||
image_tex->tex.destroy();
|
||||
image_tex->tex.create(thumb);
|
||||
container->add_child(node);
|
||||
App::I.async_update();
|
||||
App::I.async_end();
|
||||
|
||||
// node->on_selected = [&](NodeDialogCloudItem* target) {
|
||||
|
||||
Reference in New Issue
Block a user