diff --git a/engine.vcxproj b/engine.vcxproj index 6a6bc43..9aaf9de 100644 --- a/engine.vcxproj +++ b/engine.vcxproj @@ -354,7 +354,9 @@ - + + Designer + diff --git a/engine/app_layout.cpp b/engine/app_layout.cpp index 954a39f..04318a4 100644 --- a/engine/app_layout.cpp +++ b/engine/app_layout.cpp @@ -606,6 +606,14 @@ void App::initLayout() init_menu_layer(); init_menu_timelapse(); + if (auto* menu_entry = layout[main_id]->find("menu-about")) + { + menu_entry->on_click = [=](Node*) { +// int x = 0; +// sin(time(0) / x); + }; + } + Brush b; b.m_tex_id = brushes->get_texture_id(0); b.id = brushes->get_brush_id(0); diff --git a/engine/main.cpp b/engine/main.cpp index 003d508..9b205a1 100644 --- a/engine/main.cpp +++ b/engine/main.cpp @@ -245,6 +245,16 @@ static void SetupExceptionHandler() BT_AddLogFile(wpath); BT_SetPreErrHandler([](INT_PTR){ + if (ui::Canvas::I) + { + auto path = App::I.data_path + "/recovery.pano"; + ui::Canvas::I->project_save_thread(path); + static char abspath[MAX_PATH]; + GetFullPathNameA(path.c_str(), MAX_PATH, abspath, NULL); + static char message[4096]; + snprintf(message, sizeof(message), "File recovered in: %s", abspath); + MessageBoxA(NULL, message, "File Recovery", MB_OK | MB_ICONWARNING); + } LogRemote::I.file_close(); }, 0); }