Skip to content

Commit 439525c

Browse files
committed
Fixed animation bug
1 parent bce14ad commit 439525c

File tree

27 files changed

+28
-28
lines changed

27 files changed

+28
-28
lines changed

scripts/draw_switch/draw_switch.gml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function draw_switch() {
1111
lock = argument[5]
1212
if (tip != "") popup_set_window(xx, yy, 13 + string_width(str) + 8, 13, tip)
1313
if (lock = 1) {
14-
draw_sprite(spr_switch, 6, xx, yy)
14+
if (!expression) draw_sprite(spr_switch, 6, xx, yy)
1515
if (expression) draw_sprite(spr_switch, 7, xx, yy)
1616
draw_set_color(make_color_rgb(204, 204, 204))
1717
if (theme) {
@@ -25,7 +25,7 @@ function draw_switch() {
2525
m = mouse_rectangle(xx, yy, 26 + string_width(str) + 8, 13)
2626
if (w_isdragging > 0) m = 0
2727
if (m) m += mouse_check_button(mb_left)
28-
draw_sprite(spr_switch, m, xx, yy)
28+
if (!expression) draw_sprite(spr_switch, m, xx, yy)
2929
if (expression) draw_sprite(spr_switch, m + 3, xx, yy)
3030
draw_text(xx + 31, yy - 1, str)
3131
return (m && mouse_check_button_released(mb_left))

scripts/draw_window_about/draw_window_about.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function draw_window_about() {
2121
draw_text(x1 + 150, y1 + 217, "Version " + version + " - Released " + version_date + "\n\nThis program is a continuation of\n Minecraft Note Block Studio, \ncreated by David Norgren. \n\nThis product is not affiliated with\nMojang Studios, Microsoft Studios\nor the game Minecraft.")
2222
}
2323
draw_set_halign(fa_left)
24-
if (draw_button2(x1 + 120, y1 + 370, 72, "OK", false)) windowclose = 1
24+
if (draw_button2(x1 + 120, y1 + 370, 72, "OK", false) && windowopen = 1) windowclose = 1
2525
window_set_cursor(cr_default)
2626
if (windowopen = 0 && theme = 3) {
2727
if (windowalpha < 1) {

scripts/draw_window_branch_export/draw_window_branch_export.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function draw_window_branch_export() {
211211
branch_export()
212212
}
213213
}
214-
if (draw_button2(x1 + 470 - 80 * 1, y1 + 368, 72, "Cancel") && wmenu = 0) {
214+
if (draw_button2(x1 + 470 - 80 * 1, y1 + 368, 72, "Cancel") && wmenu = 0 && windowopen = 1) {
215215
windowclose = 1
216216
selected_tab_sch = 0
217217
}

scripts/draw_window_clip_editor/draw_window_clip_editor.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function draw_window_clip_editor() {
2323
text_exists[59] = 0
2424
selection_copied = draw_text_edit(59, selection_copied, x1 + 32, y1 + 23 * 3, 370, 300, 0, 0)
2525

26-
if (draw_button2(x1 + 320, y1 + 398, 72, "OK")) {
26+
if (draw_button2(x1 + 320, y1 + 398, 72, "OK") && windowopen = 1) {
2727
windowclose = 1
2828
}
2929
window_set_cursor(curs)

scripts/draw_window_datapack_export/draw_window_datapack_export.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ function draw_window_datapack_export() {
228228
}
229229

230230
//Cancel button
231-
if (draw_button2(x1 + 390, y1 + 398, 72, "Cancel", false)) {
231+
if (draw_button2(x1 + 390, y1 + 398, 72, "Cancel", false) && windowopen = 1) {
232232
windowclose = 1
233233
}
234234
window_set_cursor(cr_default)

scripts/draw_window_greeting/draw_window_greeting.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function draw_window_greeting() {
7474
draw_sprite(spr_bigicons_f, 0, b + (a > 1), c + (a > 1))
7575
}
7676
draw_text(b + 48 + (a > 1), c + 9 + (a > 1), "Create a new song")
77-
if (a = 2 && mouse_check_button_released(mb_left)) windowclose = 1
77+
if (a = 2 && mouse_check_button_released(mb_left) && windowopen = 1) windowclose = 1
7878

7979
c += 44
8080
b = x1 + 300

scripts/draw_window_instruments/draw_window_instruments.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function draw_window_instruments() {
7676
instrument_swap(userselect, instrument_list[| insselect])
7777
c = 1
7878
}
79-
if (draw_button2(x1 + 456, y1 + 318, 80, "OK") && wmenu = 0) {
79+
if (draw_button2(x1 + 456, y1 + 318, 80, "OK") && wmenu = 0 && windowopen = 1) {
8080
windowclose = 1
8181
if (save_version < 5 && user_instruments > 18) {
8282
show_message("This song contains more than 18 instruments and cannot be saved in version " + string(save_version) + ". The save version will be changed to " + string(nbs_version) + ".")

scripts/draw_window_macro_arpeggio/draw_window_macro_arpeggio.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function draw_window_macro_arpeggio() {
6262
selection_load(selection_x,selection_y,str,true)
6363
selection_code_update()
6464
}
65-
if (draw_button2(x1 + 70, y1 + 98, 60, "Cancel")) {windowclose = 1}
65+
if (draw_button2(x1 + 70, y1 + 98, 60, "Cancel") && windowopen = 1) {windowclose = 1}
6666
window_set_cursor(curs)
6767
window_set_cursor(cr_default)
6868
if (windowopen = 0 && theme = 3) {

scripts/draw_window_macro_portamento/draw_window_macro_portamento.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function draw_window_macro_portamento() {
5555
selection_load(selection_x,selection_y,str,true)
5656
if(!keyboard_check(vk_alt)) selection_place(false)
5757
}
58-
if (draw_button2(x1 + 70, y1 + 98, 60, "Cancel")) {windowclose = 1}
58+
if (draw_button2(x1 + 70, y1 + 98, 60, "Cancel") && windowopen = 1) {windowclose = 1}
5959
window_set_cursor(curs)
6060
window_set_cursor(cr_default)
6161
if (windowopen = 0 && theme = 3) {

scripts/draw_window_macro_setpanning/draw_window_macro_setpanning.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function draw_window_macro_setpanning() {
4646
selection_load(selection_x,selection_y,str,true)
4747
if(!keyboard_check(vk_alt)) selection_place(false)
4848
}
49-
if (draw_button2(x1 + 70, y1 + 98, 60, "Cancel")) {windowclose = 1}
49+
if (draw_button2(x1 + 70, y1 + 98, 60, "Cancel") && windowopen = 1) {windowclose = 1}
5050
window_set_cursor(curs)
5151
window_set_cursor(cr_default)
5252
if (windowopen = 0 && theme = 3) {

0 commit comments

Comments
 (0)