add export layers, export png, import brush padding
This commit is contained in:
@@ -21,7 +21,7 @@ void App::init_toolbar_main()
|
||||
button->on_click = [this, button](Node*) {
|
||||
if (canvas)
|
||||
{
|
||||
canvas->m_canvas->export_anim();
|
||||
//canvas->m_canvas->export_anim();
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -463,10 +463,40 @@ void App::init_menu_file()
|
||||
};
|
||||
if (auto b = popup->find<NodeButtonCustom>("file-export"))
|
||||
b->on_click = [this](Node*) {
|
||||
dialog_export();
|
||||
dialog_export(".jpg");
|
||||
popup->mouse_release();
|
||||
popup->destroy();
|
||||
};
|
||||
if (auto b = popup->find<NodeButtonCustom>("file-export-tick"))
|
||||
b->on_click = [this,b](Node*) {
|
||||
glm::vec2 pos = b->m_pos + glm::vec2(b->m_size.x, 0);
|
||||
subpopup = (NodePopupMenu*)layout[const_hash("file-submenu-export")]->m_children[0]->clone();
|
||||
subpopup->update();
|
||||
if (YGNodeStyleGetDirection(layout[main_id]->y_node) == YGDirectionRTL)
|
||||
pos.x = pos.x - subpopup->m_size.x + b->m_size.x;
|
||||
subpopup->SetPositioning(YGPositionTypeAbsolute);
|
||||
subpopup->SetPosition(pos.x, pos.y);
|
||||
layout[main_id]->add_child(subpopup);
|
||||
layout[main_id]->update();
|
||||
subpopup->mouse_capture();
|
||||
subpopup->m_mouse_ignore = false;
|
||||
subpopup->m_flood_events = true;
|
||||
subpopup->m_capture_children = false;
|
||||
subpopup->find<NodeButtonCustom>("file-submenu-export-png")->on_click = [this](Node*) {
|
||||
dialog_export(".png");
|
||||
subpopup->mouse_release();
|
||||
subpopup->destroy();
|
||||
popup->mouse_release();
|
||||
popup->destroy();
|
||||
};
|
||||
subpopup->find<NodeButtonCustom>("file-submenu-export-layers")->on_click = [this](Node*) {
|
||||
dialog_export_layers();
|
||||
subpopup->mouse_release();
|
||||
subpopup->destroy();
|
||||
popup->mouse_release();
|
||||
popup->destroy();
|
||||
};
|
||||
};
|
||||
if (auto b = popup->find<NodeButtonCustom>("file-share"))
|
||||
b->on_click = [this](Node*) {
|
||||
share_file(doc_path);
|
||||
|
||||
Reference in New Issue
Block a user