Thin node loader, Win32 wrappers, and canvas mode shells
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "legacy_ui_node_loader.h"
|
||||
|
||||
#include "legacy_ui_node_attributes.h"
|
||||
#include "log.h"
|
||||
#include "node.h"
|
||||
#include "layout.h"
|
||||
@@ -154,6 +155,32 @@ void load_typed_child(Node& parent, const tinyxml2::XMLElement& x_child, std::st
|
||||
|
||||
} // namespace
|
||||
|
||||
void load_legacy_ui_node(Node& node, const tinyxml2::XMLElement& x_node, bool skip_children)
|
||||
{
|
||||
node.m_name = x_node.Name();
|
||||
//LOG("load_internal node %s", node.m_name.c_str());
|
||||
|
||||
node.init();
|
||||
|
||||
auto attr = x_node.FirstAttribute();
|
||||
while (attr)
|
||||
{
|
||||
parse_legacy_ui_node_attribute(node, (kAttribute)const_hash(attr->Name()), attr);
|
||||
attr = attr->Next();
|
||||
}
|
||||
|
||||
node.create();
|
||||
|
||||
if (skip_children)
|
||||
{
|
||||
node.loaded();
|
||||
return;
|
||||
}
|
||||
|
||||
load_legacy_ui_children(node, x_node);
|
||||
node.loaded();
|
||||
}
|
||||
|
||||
void load_legacy_ui_children(Node& parent, const tinyxml2::XMLElement& x_node)
|
||||
{
|
||||
auto x_child = x_node.FirstChildElement();
|
||||
|
||||
Reference in New Issue
Block a user