add webgl support
This commit is contained in:
@@ -177,8 +177,12 @@ void NodePanelQuick::init_controls()
|
||||
|
||||
NodeButtonCustom* NodePanelQuick::init_button_brush(const std::string& name, bool szp, bool flp)
|
||||
{
|
||||
LOG("init_button_brush %s", name.c_str());
|
||||
auto button = find<NodeButtonCustom>(name.c_str());
|
||||
if (!button)
|
||||
LOG("couldn't find button %s", name.c_str());
|
||||
button->on_click = std::bind(&this_class::handle_button_brush_click, this, std::placeholders::_1);
|
||||
LOG("button has %d children", button->m_children.size());
|
||||
auto pr = static_cast<NodeStrokePreview*>(button->m_children[0].get());
|
||||
pr->m_brush = std::make_shared<Brush>();
|
||||
pr->m_brush->m_tip_size_pressure = szp;
|
||||
|
||||
Reference in New Issue
Block a user