You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/draw_piano/draw_piano.gml
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ function draw_piano(argument0, argument1, argument2, argument3) {
24
24
k2 = show_keyboard && piano_key[c2] > 0
25
25
if (window = 0 && mouse_rectangle(xx + 39 * a, yy, 39, 128)) {
26
26
if (!mouse_rectangle(xx + 39 * a - 12, yy - 7, 25, 71) && (!mouse_rectangle(xx + 39 * a + 27, yy - 7, 25, 71) || (a = k - 1 || c = 1 || c = 4))) {
27
-
if (show_notechart && c2 > 6 && c2 < 69 && playing = 0 && !isplayer) draw_notechart(xx + 39 * a + 18, yy - 32, startkey + a, 0)
27
+
if (show_notechart && c2 > 6 && c2 < 69 && playing = 0 && !isplayer) draw_notechart(xx + 39 * a + 18, yy - 32, startkey + a, 0)//handle all white keys except C and F
28
28
if (mouse_check_button_pressed(mb_right) && show_keyboard) key_edit = c2
29
29
// Check mouse clicks
30
30
t = key_click[c2]
@@ -42,8 +42,9 @@ function draw_piano(argument0, argument1, argument2, argument3) {
42
42
key_click[c2] = 0
43
43
}
44
44
if (window = 0 && mouse_rectangle(xx + 39 * a - 12, yy - 7, 25, 71)) {
45
-
if (show_notechart && c1 > 6 && c1 < 70 && playing = 0 && !isplayer) draw_notechart(xx + 39 * a - 12 + 12, yy - 32, startkey + a - 1, 1)
46
-
if (mouse_check_button_pressed(mb_right) && show_keyboard) key_edit = c1
45
+
if (show_notechart && !keynames_flat && c1 > 6 && c1 < 70 && playing = 0 && !isplayer) draw_notechart(xx + 39 * a - 12 + 12, yy - 32, startkey + a - 1, 1) //handles all sharps
46
+
if (show_notechart && keynames_flat && c1 > 5 && c1 < 69 && playing = 0 && !isplayer) draw_notechart(xx + 39 * a - 12 + 12, yy - 32, startkey + a, 1) //handles all flats
47
+
if (mouse_check_button_pressed(mb_right) && show_keyboard) key_edit = c1
47
48
t = key_click[c1]
48
49
key_click[c1] = mouse_check_button(mb_left)
49
50
if (t = 0 && key_click[c1]) {
@@ -86,7 +87,7 @@ function draw_piano(argument0, argument1, argument2, argument3) {
86
87
k1 = (show_keyboard && piano_key[c1] > 0)
87
88
if (window = 0 && mouse_rectangle(xx + 39 * a, yy, 39, 128)) {
88
89
if (!mouse_rectangle(xx + 39 * a + 27, yy - 7, 25, 71) || (a = k - 1 || c = 1 || c = 4)) {
89
-
if (show_notechart && c1 > 6 && c1 < 69 && playing = 0) draw_notechart(xx + 39 * a + 18, yy - 32, startkey + a, 0)
90
+
if (show_notechart && c1 > 6 && c1 < 69 && playing = 0) draw_notechart(xx + 39 * a + 18, yy - 32, startkey + a, 0)//handles C and F
90
91
if (mouse_check_button_pressed(mb_right) && show_keyboard) key_edit = c1
0 commit comments