preset button to simple button

This commit is contained in:
2019-02-26 16:15:02 +01:00
parent a0ed079299
commit 451406c17c
6 changed files with 10 additions and 21 deletions

View File

@@ -268,12 +268,7 @@ void NodePanelStroke::init_controls()
// BRUSH PRESETS
m_preset_thumb = find<NodeImage>("preset-thumb");
m_preset_thumb->m_use_mipmaps = true;
m_preset_preview = find<NodeStrokePreview>("preset-preview");
m_preset_preview->m_brush = b;
m_preset_preview->draw_stroke();
m_preset_button = find<NodeButtonCustom>("preset-button");
m_preset_button = find<NodeButton>("preset-button");
m_preset_button->on_click = [this](Node*) {
auto screen = root()->m_size;
glm::vec2 pos = m_preset_button->m_pos + glm::vec2(m_preset_button->m_size.x, 0);
@@ -302,10 +297,8 @@ void NodePanelStroke::init_controls()
b->m_tip_color = Canvas::I->m_current_brush->m_tip_color;
*Canvas::I->m_current_brush = *b;
m_preview->draw_stroke();
m_preset_preview->draw_stroke();
m_brush_thumb->set_image(b->m_brush_thumb_path);
m_dual_brush_thumb->set_image(b->m_dual_thumb_path);
m_preset_thumb->set_image(b->m_brush_thumb_path);
m_pattern_thumb->set_image(b->m_pattern_thumb_path);
update_controls();
};