add template Node::clone() and remove destroy_immediate
This commit is contained in:
@@ -14,7 +14,7 @@ void NodeUserManual::init()
|
||||
SetWidthP(100);
|
||||
SetHeightP(100);
|
||||
SetPositioning(YGPositionTypeAbsolute);
|
||||
m_template = (*m_manager)[const_hash("usermanual")]->m_children[0]->clone();
|
||||
auto m_template = (*m_manager)[const_hash("usermanual")]->m_children[0]->clone();
|
||||
add_child(m_template);
|
||||
btn_ok = m_template->find<NodeButton>("btn-ok");
|
||||
btn_ok->on_click = [&](Node*) { destroy(); };
|
||||
|
||||
Reference in New Issue
Block a user