add template Node::clone() and remove destroy_immediate

This commit is contained in:
2019-08-28 23:57:29 +02:00
parent ee2483be1b
commit 462c4a52e1
18 changed files with 66 additions and 60 deletions

View File

@@ -14,7 +14,7 @@ void NodeMessageBox::init()
SetWidthP(100);
SetHeightP(100);
SetPositioning(YGPositionTypeAbsolute);
m_template = (*m_manager)[const_hash("message-box")]->m_children[0]->clone();
auto m_template = (*m_manager)[const_hash("message-box")]->m_children[0]->clone();
add_child(m_template);
m_title = m_template->find<NodeText>("title");
m_message = m_template->find<NodeText>("message");