Skip to content

Commit ce314e7

Browse files
committed
Save settings on some more circumstances
- Editing a piano key - Loading a new version - Dismissing one-time warnings
1 parent b916b32 commit ce314e7

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

scripts/add_block_manual/add_block_manual.gml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ function add_block_manual(argument0, argument1, argument2, argument3, argument4,
3535
if ((key < 33 || key > 57) && warning_octaves = 0) {
3636
message("NOTE: Since this block is outside the 2 octave limit, you won't be able to import it into Minecraft without a resource pack.\n\nThis warning will never be shown again.", "Warning")
3737
warning_octaves = 1
38+
save_settings()
3839
} else if (ins.user && warning_instrument = 0) {
3940
message("NOTE: Since this block has a custom instrument, you won't be able to import it into Minecraft without mods or resource packs.\n\nThis warning will never be shown again.", "Warning")
4041
warning_instrument = 1
42+
save_settings()
4143
}
4244

4345
// Add block

scripts/control_draw/control_draw.gml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ function control_draw() {
4949
if (keyboard_check_pressed(vk_enter) || keyboard_check_pressed(vk_space) || keyboard_check_pressed(vk_escape)) {
5050
piano_key[key_edit] = 0
5151
key_edit = -1
52+
save_settings()
5253
} else if (keyboard_check_pressed(vk_anykey)) {
5354
piano_key[key_edit] = keyboard_lastkey
5455
key_edit = -1
56+
save_settings()
5557
}
5658
}
5759

scripts/draw_window_update/draw_window_update.gml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ function draw_window_update() {
3838
if (draw_button2(x1 + 220, y1 + 340, 72, "OK")) {
3939
if (window = w_update) {
4040
window = w_greeting
41+
save_settings() // Save new version number
4142
} else {
4243
window = 0
4344
}

0 commit comments

Comments
 (0)