#include "pch.h" #include "log.h" #include "node_progress_bar.h" #include "layout.h" Node* NodeProgressBar::clone_instantiate() const { return new NodeProgressBar(); } void NodeProgressBar::init() { auto tpl = static_cast(init_template("progress-bar")); m_color = tpl->m_color; m_border_color = tpl->m_border_color; m_thinkness = tpl->m_thinkness; m_title = find("title"); btn_cancel = find("btn-cancel"); btn_cancel->on_click = [&](Node*) { destroy(); }; m_progress = find("progress"); m_progress->SetWidthP(10); }