implement brush presets save and restore from file, fix stencil nullptr, limit preview stroke max size
This commit is contained in:
@@ -62,7 +62,7 @@ void NodePanelStroke::init_controls()
|
||||
|
||||
auto b = std::make_shared<Brush>();
|
||||
int br_idx = m_brush_popup->find_brush("Round-Hard");
|
||||
b->load_texture(m_brush_popup->get_texture_path(br_idx));
|
||||
b->load_texture(m_brush_popup->get_texture_path(br_idx), m_brush_popup->get_thumb_path(br_idx));
|
||||
b->load_stencil("data/paper.jpg");
|
||||
b->m_tip_size = .1f;
|
||||
b->m_tip_flow = .5f;
|
||||
@@ -83,7 +83,7 @@ void NodePanelStroke::init_controls()
|
||||
|
||||
m_brush_popup->on_brush_changed = [this](Node*, int index) {
|
||||
if (on_brush_changed)
|
||||
on_brush_changed(this, m_brush_popup->get_texture_path(index));
|
||||
on_brush_changed(this, m_brush_popup->get_texture_path(index), m_brush_popup->get_thumb_path(index));
|
||||
m_brush_thumb->set_image(m_brush_popup->get_thumb_path(index));
|
||||
m_brush_popup->mouse_release();
|
||||
m_brush_popup->parent->remove_child(m_brush_popup.get());
|
||||
|
||||
Reference in New Issue
Block a user