fix quick panel color slots, remove RGBA float framebuffers, disable merge framebuffers

This commit is contained in:
2019-05-16 17:02:20 +02:00
parent 4f39dcf61d
commit ab9767556f
5 changed files with 31 additions and 30 deletions

View File

@@ -70,7 +70,7 @@ NodePanelQuick::MiniState NodePanelQuick::get_state() const
for (int i = 0; i < 3; i++)
{
s.brushes[i] = static_cast<NodeStrokePreview*>(m_button_brushes[i]->m_children[0].get())->m_brush;
s.colors[i] = static_cast<NodeBorder*>(m_button_color_current->m_children[0].get())->m_color;
s.colors[i] = static_cast<NodeBorder*>(m_button_colors[i]->m_children[0].get())->m_color;
}
return s;
}
@@ -82,7 +82,7 @@ void NodePanelQuick::set_state(const MiniState& state, bool fire_event /*= false
auto b = static_cast<NodeStrokePreview*>(m_button_brushes[i]->m_children[0].get());
b->m_brush = state.brushes[i];
b->draw_stroke();
auto c = static_cast<NodeBorder*>(m_button_color_current->m_children[0].get());
auto c = static_cast<NodeBorder*>(m_button_colors[i]->m_children[0].get());
c->m_color = state.colors[i];
}
set_selected_color_index(state.color_index, fire_event);
@@ -97,9 +97,10 @@ void NodePanelQuick::reset_state(bool fire_event /*= false*/)
b->m_brush = std::make_shared<Brush>();
b->m_brush->load_tip("data/brushes/Round-Hard.png", "data/brushes/thumbs/Round-Hard.png");
b->draw_stroke();
auto c = static_cast<NodeBorder*>(m_button_color_current->m_children[0].get());
c->m_color = glm::vec4(0, 0, 0, 1);
}
static_cast<NodeBorder*>(m_button_colors[0]->m_children[0].get())->m_color = glm::vec4(0, 0, 0, 1);
static_cast<NodeBorder*>(m_button_colors[1]->m_children[0].get())->m_color = glm::vec4(.5, .5, .5, 1);
static_cast<NodeBorder*>(m_button_colors[2]->m_children[0].get())->m_color = glm::vec4(1, 1, 1, 1);
set_selected_brush_index(0, fire_event);
set_selected_color_index(0, fire_event);
}