diff --git a/src/node_panel_brush.cpp b/src/node_panel_brush.cpp index 2c14273..26eace9 100644 --- a/src/node_panel_brush.cpp +++ b/src/node_panel_brush.cpp @@ -463,6 +463,24 @@ void NodePanelBrushPreset::init() root()->update(); auto bounds = root()->GetSize() - zw(popup->get_children_rect()); popup->SetPosition(glm::clamp(popup->m_pos, { 0, 0 }, bounds)); + popup->on_select = [this, popup] (Node* target, int index) { + switch (index) + { + case 0: // download + break; + case 1: // import + App::I->pick_file({".abr", ".ABR"}, [] (std::string path) { + std::thread([path] { + BT_SetTerminate(); + App::I->stroke->import_abr(path); + }).detach(); + }); + break; + case 2: // export + break; + } + popup->destroy(); + }; }; if (Asset::exist(App::I->data_path + "/settings/presets.bin") && !restore())