implement work_path for documents and data_path for assets
This commit is contained in:
@@ -72,10 +72,10 @@ void NodeDialogBrowse::init_controls()
|
||||
root()->update();
|
||||
};
|
||||
container = find<Node>("files-list");
|
||||
auto names = Asset::list_files(data_path, false, ".*\\.ppi");
|
||||
auto names = Asset::list_files(search_path, false, ".*\\.ppi");
|
||||
for (const auto& n : names)
|
||||
{
|
||||
ui::Image thumb = ui::Canvas::I->thumbnail_read(data_path + "/" + n);
|
||||
ui::Image thumb = ui::Canvas::I->thumbnail_read(search_path + "/" + n);
|
||||
if (thumb.width == 0 || thumb.height == 0)
|
||||
continue;
|
||||
|
||||
@@ -83,7 +83,7 @@ void NodeDialogBrowse::init_controls()
|
||||
node->m_manager = m_manager;
|
||||
node->init();
|
||||
node->m_text->set_text(n.c_str());
|
||||
node->m_path = data_path + "/" + n;
|
||||
node->m_path = search_path + "/" + n;
|
||||
node->m_file_name = n;
|
||||
node->on_selected = [&](NodeDialogBrowseItem* target) {
|
||||
if (target == current)
|
||||
|
||||
Reference in New Issue
Block a user