add ABR brushes and presets with properties and patterns

This commit is contained in:
2019-02-10 16:52:37 +01:00
parent e629a2a7b5
commit 1d6c26f2ba
12 changed files with 379 additions and 124 deletions

View File

@@ -100,20 +100,22 @@ void App::pick_file(std::vector<std::string> types, std::function<void (std::str
#elif __ANDROID__
//android_pick_file(and_app, callback);
#elif _WIN32
std::string filter = "Image Files (";
std::string filter = "Supported Files (";
bool first_type = true;
for (auto& t : types)
{
filter += std::string(first_type ? "" : " ,") + "*." + t;
filter.append(std::string(first_type ? "" : " ,") + "*." + t);
first_type = false;
}
filter += ")\0";
filter.append(")");
filter.push_back(0);
first_type = true;
for (auto& t : types)
{
filter += std::string(first_type ? "" : ";") + "*." + t;
filter.append(std::string(first_type ? "" : ";") + "*." + t);
first_type = false;
}
filter.push_back(0);
std::string path = win32_open_file(filter.c_str());
if (!path.empty())
callback(path);