save on exit message, * symbol on unsaved docs, saved status on history
This commit is contained in:
@@ -40,21 +40,23 @@ bool App::request_close()
|
||||
async_start();
|
||||
auto* m = layout[main_id]->add_child<NodeMessageBox>();
|
||||
m->m_title->set_text("Unsaved document");
|
||||
m->m_message->set_text("Would you like to save before closing?");
|
||||
m->m_message->set_text("Do you want to close without saving?");
|
||||
m->btn_ok->m_text->set_text("Yes");
|
||||
m->btn_ok->on_click = [](Node*) {
|
||||
};
|
||||
m->btn_cancel->m_text->set_text("No");
|
||||
m->btn_cancel->on_click = [this](Node*) {
|
||||
#ifdef _WIN32
|
||||
#ifdef _WIN32
|
||||
destroy_window();
|
||||
PostQuitMessage(0);
|
||||
#endif
|
||||
#ifdef __OSX__
|
||||
#endif
|
||||
#ifdef __OSX__
|
||||
[osx_view close];
|
||||
#endif
|
||||
#endif
|
||||
ui::Canvas::I->m_unsaved = false;
|
||||
};
|
||||
m->btn_cancel->m_text->set_text("No");
|
||||
m->btn_cancel->on_click = [this,m](Node*) {
|
||||
m->destroy();
|
||||
dialog_already_opened = false;
|
||||
};
|
||||
async_redraw();
|
||||
async_end();
|
||||
dialog_already_opened = true;
|
||||
@@ -267,7 +269,7 @@ void App::init()
|
||||
initShaders();
|
||||
initAssets();
|
||||
initLayout();
|
||||
|
||||
title_update();
|
||||
|
||||
GLfloat width_range[2];
|
||||
glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, width_range);
|
||||
|
||||
Reference in New Issue
Block a user