add text input popup

This commit is contained in:
2019-09-12 14:37:09 +02:00
parent 0d2777c4ae
commit c8666b9e67
7 changed files with 130 additions and 4 deletions

View File

@@ -44,6 +44,21 @@ std::shared_ptr<NodeMessageBox> App::message_box(const std::string &title, const
return m;
}
std::shared_ptr<NodeInputBox> App::input_box(const std::string& title,
const std::string& field_name, const std::string& ok_caption /*= "Ok"*/)
{
auto m = std::make_shared<NodeInputBox>();
m->m_manager = &layout;
m->init();
m->create();
m->loaded();
m->m_title->set_text(title.c_str());
m->m_field_name->set_text(field_name.c_str());
m->btn_ok->m_text->set_text(ok_caption.c_str());
layout[main_id]->add_child(m);
return m;
}
void App::dialog_usermanual()
{
auto dialog = std::make_shared<NodeUserManual>();