added color quad and hue slider

This commit is contained in:
2017-03-21 09:56:33 +00:00
parent 13fa84a02c
commit 03a5212e56
6 changed files with 202 additions and 28 deletions

View File

@@ -418,6 +418,7 @@ void Node::load_internal(const tinyxml2::XMLElement* x_node)
switch (child_id)
{
#define CASE(W,C) case W: { auto n = new C(); add_child(n); n->load_internal(x_child); break; }
CASE(kWidget::Node, Node);
CASE(kWidget::Border, NodeBorder);
CASE(kWidget::Image, NodeImage);
CASE(kWidget::Icon, NodeIcon);
@@ -425,13 +426,16 @@ void Node::load_internal(const tinyxml2::XMLElement* x_node)
CASE(kWidget::Button , NodeButton);
CASE(kWidget::ButtonCustom, NodeButtonCustom);
CASE(kWidget::SliderCursor, NodeSliderCursor);
CASE(kWidget::Slider, NodeSlider);
CASE(kWidget::SliderH, NodeSliderH);
CASE(kWidget::SliderV, NodeSliderV);
CASE(kWidget::SliderHue, NodeSliderHue);
CASE(kWidget::PopupMenu, NodePopupMenu);
CASE(kWidget::Viewport, NodeViewport);
CASE(kWidget::CheckBox, NodeCheckBox);
CASE(kWidget::Layer, NodeLayer);
CASE(kWidget::PanelLayers, NodePanelLayers);
CASE(kWidget::PanelBrushes, NodePanelBrushes);
CASE(kWidget::ColorQuad, NodeColorQuad);
#undef CASE
case kWidget::Ref:
{
@@ -444,6 +448,7 @@ void Node::load_internal(const tinyxml2::XMLElement* x_node)
}
default:
{
LOG("instancing UNKNOWN node: %s", x_child->Name());
auto n = new Node();
add_child(n);
n->load_internal(x_child);
@@ -460,6 +465,7 @@ Node* Node::clone()
Node* n = clone_instantiate();
clone_copy(n);
clone_children(n);
clone_finalize(n);
return n;
}