rename engine to src

This commit is contained in:
2018-09-16 14:21:58 +02:00
parent eccb34724e
commit 71de44a7c1
120 changed files with 282 additions and 282 deletions

25
src/node_message_box.cpp Normal file
View File

@@ -0,0 +1,25 @@
#include "pch.h"
#include "log.h"
#include "node_message_box.h"
#include "layout.h"
Node* NodeMessageBox::clone_instantiate() const
{
return new NodeMessageBox();
}
void NodeMessageBox::init()
{
SetPosition(0, 0);
SetWidthP(100);
SetHeightP(100);
SetPositioning(YGPositionTypeAbsolute);
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");
btn_ok = m_template->find<NodeButton>("btn-ok");
btn_ok->on_click = [&](Node*) { destroy(); };
btn_cancel = m_template->find<NodeButton>("btn-cancel");
btn_cancel->on_click = [&](Node*) { destroy(); };
}