Pixel-Composer/scripts/window_functions/window_functions.gml

26 lines
577 B
Text
Raw Normal View History

2023-09-26 14:45:15 +02:00
function close_program() {
PREF_SAVE();
//if(PREFERENCES.clear_temp_on_close) directory_destroy(TEMPDIR);
2023-09-26 14:45:15 +02:00
game_end();
}
2023-02-23 07:02:19 +01:00
function window_close() {
2024-02-06 13:53:08 +01:00
CALL("exit");
2023-07-06 19:49:16 +02:00
var noSave = true;
2023-07-25 20:12:40 +02:00
for( var i = 0, n = array_length(PROJECTS); i < n; i++ ) {
2023-07-06 19:49:16 +02:00
var project = PROJECTS[i];
2023-07-17 19:58:33 +02:00
//print($"Project {filename_name_only(project)} modified: {project.modified} readonly: {project.readonly}");
2023-07-06 19:49:16 +02:00
if(project.modified && !project.readonly) {
var dia = dialogCall(o_dialog_exit,,,, true);
dia.project = project;
noSave = false;
}
}
2023-09-26 14:45:15 +02:00
if(noSave) close_program();
2023-02-23 07:02:19 +01:00
}