add template Node::clone() and remove destroy_immediate
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user