add viewport node, return ptr instead of ref for layout[id] to check wether is valid or not
This commit is contained in:
@@ -391,11 +391,18 @@ void Node::load_internal(const tinyxml2::XMLElement* x_node)
|
||||
n->load_internal(x_child);
|
||||
break;
|
||||
}
|
||||
case kWidget::Viewport:
|
||||
{
|
||||
auto n = new NodeViewport();
|
||||
add_child(n);
|
||||
n->load_internal(x_child);
|
||||
break;
|
||||
}
|
||||
case kWidget::Ref:
|
||||
{
|
||||
auto ids = x_child->Attribute("id");
|
||||
auto id = const_hash(ids);
|
||||
auto& ref = (*m_manager)[id].m_children[0];
|
||||
auto& ref = (*m_manager)[id]->m_children[0];
|
||||
auto n = ref->clone();
|
||||
add_child(n);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user