improve progress bar, refactor node destruction, simplify layers export
This commit is contained in:
@@ -20,5 +20,17 @@ void NodeProgressBar::init()
|
||||
btn_cancel->on_click = [&](Node*) { destroy(); };
|
||||
m_progress = find<NodeBorder>("progress");
|
||||
|
||||
m_progress->SetWidthP(10);
|
||||
m_progress->SetWidthP(0);
|
||||
}
|
||||
|
||||
void NodeProgressBar::increment() noexcept
|
||||
{
|
||||
m_count++;
|
||||
if (m_total != 0)
|
||||
m_progress->SetWidthP(((float)m_count / m_total) * 100.f);
|
||||
}
|
||||
|
||||
void NodeProgressBar::set_progress(float p) noexcept
|
||||
{
|
||||
m_progress->SetWidthP(p * 100.f);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user