add changelog dialog and display_file api (implemented in osx and ios)

This commit is contained in:
2018-09-24 16:03:43 +02:00
parent c6f8bf7b9f
commit f1ff142d91
12 changed files with 152 additions and 3 deletions

26
src/node_changelog.cpp Normal file
View File

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