Skip to content

Commit 94933cc

Browse files
committed
Apply no outside window cursor change to all windows
1 parent 4bc4661 commit 94933cc

27 files changed

Lines changed: 99 additions & 47 deletions

File tree

scripts/draw_window_about/draw_window_about.gml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,7 @@ function draw_window_about() {
8989
if (draw_button2(x1 + 580 - 72 - 8, y1 + 380, 72, condstr(language != 1, "OK", "确定"), false) && (windowopen = 1 || theme != 3)) {
9090
windowclose = 1
9191
}
92-
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
92+
if (display_mouse_get_x() - window_get_x() >= 0 && display_mouse_get_y() - window_get_y() >= 0 && display_mouse_get_x() - window_get_x() < 0 + window_width && display_mouse_get_y() - window_get_y() < 0 + window_height) {
93+
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
94+
}
9395
}

scripts/draw_window_audio_export/draw_window_audio_export.gml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ function draw_window_mp3_export() {
9696
windowclose = 1
9797
}
9898

99-
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
99+
if (display_mouse_get_x() - window_get_x() >= 0 && display_mouse_get_y() - window_get_y() >= 0 && display_mouse_get_x() - window_get_x() < 0 + window_width && display_mouse_get_y() - window_get_y() < 0 + window_height) {
100+
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
101+
}
100102
}
101103

102104

scripts/draw_window_branch_export/draw_window_branch_export.gml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,8 @@ function draw_window_branch_export() {
451451
menu.menua = menua
452452
}
453453
}
454-
window_set_cursor(curs)
455-
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
454+
if (display_mouse_get_x() - window_get_x() >= 0 && display_mouse_get_y() - window_get_y() >= 0 && display_mouse_get_x() - window_get_x() < 0 + window_width && display_mouse_get_y() - window_get_y() < 0 + window_height) {
455+
window_set_cursor(curs)
456+
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
457+
}
456458
}

scripts/draw_window_clip_editor/draw_window_clip_editor.gml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ function draw_window_clip_editor() {
2727
if (draw_button2(x1 + 320, y1 + 398, 72, condstr(language != 1, "OK", "确定")) && (windowopen = 1 || theme != 3)) {
2828
windowclose = 1
2929
}
30-
window_set_cursor(curs)
31-
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
30+
if (display_mouse_get_x() - window_get_x() >= 0 && display_mouse_get_y() - window_get_y() >= 0 && display_mouse_get_x() - window_get_x() < 0 + window_width && display_mouse_get_y() - window_get_y() < 0 + window_height) {
31+
window_set_cursor(curs)
32+
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
33+
}
3234
}

scripts/draw_window_greeting/draw_window_greeting.gml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,10 @@ function draw_window_greeting() {
211211
else open_url("https://www.bilibili.com/video/BV1Mx411a76p")
212212
}
213213

214-
window_set_cursor(curs)
215-
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
214+
if (display_mouse_get_x() - window_get_x() >= 0 && display_mouse_get_y() - window_get_y() >= 0 && display_mouse_get_x() - window_get_x() < 0 + window_width && display_mouse_get_y() - window_get_y() < 0 + window_height) {
215+
window_set_cursor(curs)
216+
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
217+
}
216218
if (!isplayer) if (draw_icon(4, x1 + 700 - 40, y1 + 430 - 40, condstr(language != 1, "Player Mode", "播放器模式"), 0, 0, 1)) {
217219
isplayer = 1 //Go into player mode if button is pressed in the greeting screen
218220
//window_set_size(floor(800 * window_scale), floor(500 * window_scale))

scripts/draw_window_instruments/draw_window_instruments.gml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,9 @@ function draw_window_instruments() {
241241
draw_line(x1 + 13 + 194 + 160, y1 + 87, x1 + 13 + 194 + 160, y1 + 86 + 20 * a)
242242
draw_line(x1 + 13 + 194 + 160 + 80, y1 + 87, x1 + 13 + 194 + 160 + 80, y1 + 86 + 20 * a)
243243
draw_scrollbar(insscrollbar, x1 + 14 + 194 + 160 + 80 + 70, y1 + 88, 21, 9, ds_list_size(instrument_list) - 2, 0, 1)
244-
window_set_cursor(curs)
245-
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
244+
if (display_mouse_get_x() - window_get_x() >= 0 && display_mouse_get_y() - window_get_y() >= 0 && display_mouse_get_x() - window_get_x() < 0 + window_width && display_mouse_get_y() - window_get_y() < 0 + window_height) {
245+
window_set_cursor(curs)
246+
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
247+
}
246248

247249
}

scripts/draw_window_macro_arpeggio/draw_window_macro_arpeggio.gml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ function draw_window_macro_arpeggio() {
6868
selection_code_update()
6969
}
7070
if (draw_button2(x1 + 70, y1 + 98, 60, condstr(language !=1, "Cancel", "取消")) && (windowopen = 1 || theme != 3)) {windowclose = 1}
71-
window_set_cursor(curs)
72-
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
71+
if (display_mouse_get_x() - window_get_x() >= 0 && display_mouse_get_y() - window_get_y() >= 0 && display_mouse_get_x() - window_get_x() < 0 + window_width && display_mouse_get_y() - window_get_y() < 0 + window_height) {
72+
window_set_cursor(curs)
73+
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
74+
}
7375

7476
}

scripts/draw_window_macro_portamento/draw_window_macro_portamento.gml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ function draw_window_macro_portamento() {
6060
if(!keyboard_check(vk_alt)) selection_place(false)
6161
}
6262
if (draw_button2(x1 + 70, y1 + 98, 60, condstr(language !=1, "Cancel", "取消")) && (windowopen = 1 || theme != 3)) {windowclose = 1}
63-
window_set_cursor(curs)
64-
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
63+
if (display_mouse_get_x() - window_get_x() >= 0 && display_mouse_get_y() - window_get_y() >= 0 && display_mouse_get_x() - window_get_x() < 0 + window_width && display_mouse_get_y() - window_get_y() < 0 + window_height) {
64+
window_set_cursor(curs)
65+
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
66+
}
6567
}

scripts/draw_window_macro_setpanning/draw_window_macro_setpanning.gml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ function draw_window_macro_setpanning() {
5151
if(!keyboard_check(vk_alt)) selection_place(false)
5252
}
5353
if (draw_button2(x1 + 70, y1 + 98, 60, condstr(language !=1, "Cancel", "取消")) && (windowopen = 1 || theme != 3)) {windowclose = 1}
54-
window_set_cursor(curs)
55-
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
54+
if (display_mouse_get_x() - window_get_x() >= 0 && display_mouse_get_y() - window_get_y() >= 0 && display_mouse_get_x() - window_get_x() < 0 + window_width && display_mouse_get_y() - window_get_y() < 0 + window_height) {
55+
window_set_cursor(curs)
56+
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
57+
}
5658
}

scripts/draw_window_macro_setpitch/draw_window_macro_setpitch.gml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ function draw_window_macro_setpitch() {
5454
if(!keyboard_check(vk_alt)) selection_place(false)
5555
}
5656
if (draw_button2(x1 + 70, y1 + 98, 60, condstr(language !=1, "Cancel", "取消")) && (windowopen = 1 || theme != 3)) {windowclose = 1}
57-
window_set_cursor(curs)
58-
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
57+
if (display_mouse_get_x() - window_get_x() >= 0 && display_mouse_get_y() - window_get_y() >= 0 && display_mouse_get_x() - window_get_x() < 0 + window_width && display_mouse_get_y() - window_get_y() < 0 + window_height) {
58+
window_set_cursor(curs)
59+
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
60+
}
5961
}

0 commit comments

Comments
 (0)