Skip to content

Commit 82214a0

Browse files
committed
feat: add menu entry to restore unsaved files
1 parent c1ed7d6 commit 82214a0

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

scripts/control_draw/control_draw.gml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,7 +1570,7 @@ function control_draw() {
15701570
icon(icons.OPEN)+"Ctrl+O$Open song...|Recent songs...|\\|" + str + condstr(recent_song[0] != "", "-|Clear recent songs") + condstr(recent_song[0] = "", "^!No recent songs") + "|/|-|"+
15711571
icon(icons.SAVE)+"Ctrl+S$Save song|"+
15721572
icon(icons.SAVE_AS)+"Save song as a new file...|" +
1573-
inactive(totalblocks = 0 || ds_list_size(instrument_list) <= first_custom_index) + icon(icons.INSTRUMENTS) + "Save song with custom sounds...|Save options...|-|"+
1573+
inactive(totalblocks = 0 || ds_list_size(instrument_list) <= first_custom_index) + icon(icons.INSTRUMENTS) + "Save song with custom sounds...|Save options...|Restore unsaved files...|-|"+
15741574
inactive(selected != 0)+"Import pattern...|"+
15751575
inactive(selected = 0)+"Export pattern...|"+"Import from MIDI...|Import from schematic...|-|"+
15761576
inactive(totalblocks = 0) + "Export as audio track...|"+
@@ -1659,7 +1659,7 @@ function control_draw() {
16591659
icon(icons.OPEN)+"Ctrl+O$打开歌曲......|最近歌曲......|\\|" + str + condstr(recent_song[0] != "", "-|清除最近歌曲") + condstr(recent_song[0] = "", "^!无最近歌曲") + "|/|-|"+
16601660
icon(icons.SAVE)+"Ctrl+S$保存歌曲|"+
16611661
icon(icons.SAVE_AS)+"另存为|"+
1662-
inactive(totalblocks = 0 || ds_list_size(instrument_list) <= first_custom_index) + "连带自定义音色一起导出......|保存选项......|-|" +
1662+
inactive(totalblocks = 0 || ds_list_size(instrument_list) <= first_custom_index) + "连带自定义音色一起导出......|保存选项......|Restore unsaved files...|-|" +
16631663
inactive(selected != 0)+"导入片段......|"+
16641664
inactive(selected = 0)+"导出片段......|"+"从 MIDI 文件导入......|从 Schematic 文件导入......|-|"+
16651665
inactive(totalblocks = 0) + "导出音频文件......|"+

scripts/menu_click/menu_click.gml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,23 @@ function menu_click(argument0) {
4545
if (sel = b + 5) save_song("")
4646
if (sel = b + 6) save_song_zip("")
4747
if (sel = b + 7) window = w_saveoptions
48-
if (sel = b + 8) pattern_import("")
49-
if (sel = b + 9) pattern_export("")
50-
if (sel = b + 10) open_midi("")
51-
if (sel = b + 11) open_schematic("")
52-
if (sel = b + 12) window = w_mp3_export
53-
if (sel = b + 13) {
48+
if (sel = b + 8) open_url(backup_directory)
49+
if (sel = b + 9) pattern_import("")
50+
if (sel = b + 10) pattern_export("")
51+
if (sel = b + 11) open_midi("")
52+
if (sel = b + 12) open_schematic("")
53+
if (sel = b + 13) window = w_mp3_export
54+
if (sel = b + 14) {
5455
if (calculate_size()) window = w_schematic_export
5556
}
56-
if (sel = b + 14) {
57+
if (sel = b + 15) {
5758
if (calculate_size()) window = w_track_export
5859
}
59-
if (sel = b + 15) {
60+
if (sel = b + 16) {
6061
if (calculate_size()) window = w_branch_export
6162
}
62-
if(sel = b + 16) window = w_datapack_export
63-
if (sel = b + 17) game_end()
63+
if(sel = b + 17) window = w_datapack_export
64+
if (sel = b + 18) game_end()
6465
break
6566
}
6667
case "edit": {

0 commit comments

Comments
 (0)