refactor to have a single global current brush on Canvas::m_current_brush and make panels read from it for drawing instead of relying on their own copy
This commit is contained in:
@@ -256,6 +256,11 @@ void App::update(float dt)
|
||||
layout[main_id]->find<NodeButton>("btn-touchlock")->set_color(
|
||||
canvas->m_canvas->m_touch_lock ? color_button_hlight : color_button_normal);
|
||||
|
||||
stroke->update_controls();
|
||||
auto pix = ui::Canvas::I->m_current_brush.m_tip_color;
|
||||
auto hsv = convert_rgb2hsv(glm::vec3(pix[0], pix[1], pix[2]));
|
||||
color->m_hue->set_value(hsv.x);
|
||||
color->m_quad->set_value(1.f - hsv.y, 1.f - hsv.z);
|
||||
|
||||
auto observer = [this](Node* n)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user