request save on exit wip

This commit is contained in:
2018-07-30 23:35:27 +02:00
parent a66af9abb8
commit 87fcea61b8
7 changed files with 42 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ static glm::vec4 color_button_hlight{ 1, .0, .0, 1 };
void App::title_update(std::string name, int resolution)
{
static char str[256];
snprintf(str, 256, "Panodoc: %s (%dpx)", doc_name.c_str(), resolution);
snprintf(str, 256, "Panodoc: %s%s (%dpx)", doc_name.c_str(), canvas->m_canvas->m_unsaved ? "*" : "", resolution);
if (auto docname = layout[main_id]->find<NodeText>("txt-docname"))
docname->set_text(str);
}
@@ -661,6 +661,7 @@ void App::initLayout()
layout[main_id]->add_child(butt);
butt->on_click = [this](Node*){
toggle_ui();
};
if (auto* slider = layout[main_id]->find<NodeSliderH>("frames-slider"))