add ppbr export dialog, implement text input focus

This commit is contained in:
2019-09-12 19:10:42 +02:00
parent c875323516
commit 61bcd86d2c
10 changed files with 97 additions and 16 deletions

View File

@@ -12,6 +12,7 @@
#ifdef __QUEST__
#include "oculus_vr.h"
#endif
#include "node_dialog_export_ppbr.h"
std::shared_ptr<NodeProgressBar> App::show_progress(const std::string& title, int total /*= 0*/)
{
@@ -595,3 +596,25 @@ void App::dialog_preset_download()
{
}
void App::dialog_ppbr_export()
{
auto root = layout[main_id];
auto dialog = root->add_child_ref<NodeDialogExportPPBR>();
dialog->btn_ok->on_click = [this,dialog] (Node*) {
#if __IOS__
App::I->pick_file_save("ppbr", [this](std::string path) {
presets->export_ppbr(path, {});
});
#else
App::I->pick_file_save({ "ppbr" }, [this](std::string path) {
std::thread([this, path] {
BT_SetTerminate();
presets->export_ppbr(path, {});
App::I->message_box("Export PPBR", "Brushes exported to:\n" + path);
}).detach();
});
#endif
dialog->destroy();
};
}