added settings popup and icon node
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
Plane NodeBorder::m_plane;
|
||||
Plane NodeImage::m_plane;
|
||||
Sampler NodeImage::m_sampler;
|
||||
std::map<std::string, glm::vec4> NodeIcon::m_icons;
|
||||
|
||||
kEventResult Node::on_event(Event* e)
|
||||
{
|
||||
@@ -164,9 +165,6 @@ void Node::parse_attributes(kAttribute ka, const tinyxml2::XMLAttribute* attr)
|
||||
}
|
||||
break;
|
||||
case kAttribute::MinWidth:
|
||||
if (strchr(attr->Value(), '%'))
|
||||
YGNodeStyleSetMinWidthPercent(y_node, attr->FloatValue());
|
||||
else
|
||||
YGNodeStyleSetMinWidth(y_node, attr->FloatValue());
|
||||
break;
|
||||
case kAttribute::MaxWidth:
|
||||
@@ -313,6 +311,9 @@ void Node::parse_attributes(kAttribute ka, const tinyxml2::XMLAttribute* attr)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case kAttribute::FloodEvents:
|
||||
m_flood_events = attr->IntValue() > 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -355,6 +356,13 @@ void Node::load_internal(const tinyxml2::XMLElement* x_node)
|
||||
n->load_internal(x_child);
|
||||
break;
|
||||
}
|
||||
case kWidget::Icon:
|
||||
{
|
||||
auto n = new NodeIcon();
|
||||
add_child(n);
|
||||
n->load_internal(x_child);
|
||||
break;
|
||||
}
|
||||
case kWidget::Text:
|
||||
{
|
||||
auto n = new NodeText();
|
||||
|
||||
Reference in New Issue
Block a user