|
1 | | -// set parent window of dialogs to be game window |
| 1 | +// Set parent window of dialogs to be game window |
2 | 2 | if (os_type = os_windows || os_type = os_macosx || os_type = os_linux) widget_set_owner(string(int64(window_handle()))) |
3 | 3 |
|
4 | | -// copy defaults into sandbox to allow modification |
| 4 | +// Copy defaults into sandbox to allow modification |
5 | 5 | directory_create(game_save_id) |
6 | | -if (os_type != os_windows) { |
7 | | - if (!directory_exists(data_directory)) execute_program("cp", @'-fR "' + filename_dir(bundled_data_directory) + @'" "' + filename_dir(data_directory) + @'"', true) |
8 | | - if (!directory_exists(songs_directory)) execute_program("cp", @'-fR "' + filename_dir(bundled_songs_directory) + @'" "' + filename_dir(songs_directory) + @'"', true) |
9 | | - if (!directory_exists(pattern_directory)) execute_program("cp", @'-fR "' + filename_dir(bundled_pattern_directory) + @'" "' + filename_dir(pattern_directory) + @'"', true) |
10 | | -} else if (os_type = os_macosx || os_type = os_linux) { |
| 6 | +if (os_type = os_windows) { |
11 | 7 | if (!directory_exists(data_directory)) execute_program("Xcopy", @'/E /I "' + filename_dir(bundled_data_directory) + @'" "' + filename_dir(data_directory) + @'"', true) |
12 | 8 | if (!directory_exists(songs_directory)) execute_program("Xcopy", @'/E /I "' + filename_dir(bundled_songs_directory) + @'" "' + filename_dir(songs_directory) + @'"', true) |
13 | 9 | if (!directory_exists(pattern_directory)) execute_program("Xcopy", @'/E /I "' + filename_dir(bundled_pattern_directory) + @'" "' + filename_dir(pattern_directory) + @'"', true) |
| 10 | +} if (os_type = os_macosx || os_type = os_linux) { |
| 11 | + if (!directory_exists(data_directory)) execute_program("cp", @'-fR "' + filename_dir(bundled_data_directory) + @'" "' + filename_dir(data_directory) + @'"', true) |
| 12 | + if (!directory_exists(songs_directory)) execute_program("cp", @'-fR "' + filename_dir(bundled_songs_directory) + @'" "' + filename_dir(songs_directory) + @'"', true) |
| 13 | + if (!directory_exists(pattern_directory)) execute_program("cp", @'-fR "' + filename_dir(bundled_pattern_directory) + @'" "' + filename_dir(pattern_directory) + @'"', true) |
14 | 14 | } |
15 | 15 |
|
16 | | -// maximize game window on startup |
| 16 | +// Maximize game window on startup |
17 | 17 | window_zoom(window_handle()); |
18 | 18 |
|
19 | 19 | // Do everything else for create event... |
|
0 commit comments