add newline feature to the text node, add about window with credits, add about menu with submenus

This commit is contained in:
2018-09-22 19:23:17 +02:00
parent fd8d6ff2d1
commit 3191730c31
18 changed files with 255 additions and 32 deletions

26
src/node_about.cpp Normal file
View File

@@ -0,0 +1,26 @@
#include "pch.h"
#include "log.h"
#include "node_about.h"
#include "layout.h"
Node* NodeAbout::clone_instantiate() const
{
return new NodeAbout();
}
void NodeAbout::init()
{
SetPosition(0, 0);
SetWidthP(100);
SetHeightP(100);
SetPositioning(YGPositionTypeAbsolute);
m_template = (*m_manager)[const_hash("about")]->m_children[0]->clone();
add_child(m_template);
btn_ok = m_template->find<NodeButton>("btn-ok");
btn_ok->on_click = [&](Node*) { destroy(); };
}
kEventResult NodeAbout::handle_event(Event* e)
{
return kEventResult::Consumed;
}