add ComboBox node, add blend modes button in stroke panel, move brush shader code to ShaderManager and avoid the same shader being recompiled many times
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "node_scroll.h"
|
||||
#include "node_dialog_browse.h"
|
||||
#include "node_dialog_cloud.h"
|
||||
#include "node_combobox.h"
|
||||
|
||||
void Node::watch(std::function<void(Node*)> observer)
|
||||
{
|
||||
@@ -57,7 +58,7 @@ kEventResult Node::on_event(Event* e)
|
||||
|
||||
bool skip_children = false;
|
||||
skip_children |= (e->m_cat == kEventCategory::MouseEvent || e->m_cat == kEventCategory::GestureEvent) &&
|
||||
(m_mouse_captured) && (root()->current_mouse_capture == this) && m_capture_children;
|
||||
(m_mouse_captured) && (root()->current_mouse_capture == this) && m_capture_children; // <-- THIS IS WRONG "!m_capture_children" is correct, but it breaks everything if changed
|
||||
|
||||
if (!skip_children)
|
||||
{
|
||||
@@ -781,6 +782,7 @@ void Node::load_internal(const tinyxml2::XMLElement* x_node)
|
||||
CASE(kWidget::TextInput, NodeTextInput);
|
||||
CASE(kWidget::Button, NodeButton);
|
||||
CASE(kWidget::ButtonCustom, NodeButtonCustom);
|
||||
CASE(kWidget::ComboBox, NodeComboBox);
|
||||
CASE(kWidget::SliderH, NodeSliderH);
|
||||
CASE(kWidget::SliderV, NodeSliderV);
|
||||
CASE(kWidget::SliderHue, NodeSliderHue);
|
||||
@@ -868,6 +870,7 @@ void Node::clone_children(Node* dest) const
|
||||
dest->m_children.emplace_back(cn);
|
||||
cn->parent = dest;
|
||||
cn->m_manager = dest->m_manager;
|
||||
cn->loaded();
|
||||
YGNodeInsertChild(dest->y_node, cn->y_node, YGNodeGetChildCount(dest->y_node));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user