Skip to content

Commit 2de1478

Browse files
committed
Improve macro bar positioning with hidden layer boxes/piano
Fixes #136
1 parent 583bd16 commit 2de1478

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

scripts/control_draw/control_draw.gml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -999,12 +999,19 @@ if (window = w_dragstereo) {
999999
}
10001000
}
10011001
// Macro Bar
1002-
if selected != 0 {
1003-
draw_sprite_ext(spr_iconbar, 0, x1, y1+32,1, 1.3, 0, -1, 1)
1004-
draw_sprite_ext(spr_iconbar, 1, x1, y1+32, 258, 1.3, 0, -1, 1)
1005-
draw_sprite_ext(spr_iconbar, 2, 258, y1+32, 1, 1.3, 0, -1, 1)
1002+
if (selected != 0 && show_piano) {
1003+
if (show_layers) {
1004+
draw_sprite_ext(spr_iconbar, 0, x1, y1+32,1, 1.3, 0, -1, 1)
1005+
draw_sprite_ext(spr_iconbar, 1, x1, y1+32, 258, 1.3, 0, -1, 1)
1006+
draw_sprite_ext(spr_iconbar, 2, 258, y1+32, 1, 1.3, 0, -1, 1)
1007+
} else {
1008+
draw_sprite_ext(spr_iconbar, 0, x1, y1+52 ,1, 0.75, 0, -1, 1)
1009+
draw_sprite_ext(spr_iconbar, 1, x1, y1+52, 383, 0.75, 0, -1, 1)
1010+
draw_sprite_ext(spr_iconbar, 2, 383, y1+52, 1, 0.75, 0, -1, 1)
1011+
}
10061012
xx = x1 + 6
10071013
var yy = y1+37
1014+
if (!show_layers) yy += 18
10081015
if (draw_macroicon(0, xx, yy, "Tremolo...", 0, 0)) {playing = 0 window = w_tremolo} xx += 25
10091016
if (draw_macroicon(1, xx, yy, "Stereo...", 0, 0)) {playing = 0 window = w_stereo} xx += 25
10101017
if (draw_macroicon(2, xx, yy, "Arpeggio...", 0, 0)) {playing = 0 window = w_arpeggio} xx += 25
@@ -1014,12 +1021,16 @@ if (draw_macroicon(5, xx, yy, "Stagger...", 0, 0)) {playing = 0 window = w_stagg
10141021
if (draw_macroicon(6, xx, yy, "Chorus", 0, 0)) {playing = 0 macro_chorus()} xx += 25
10151022
if (draw_macroicon(7, xx, yy, "Volume LFO", 0, 0)) {playing = 0 macro_velocitylfo()} xx += 25
10161023
if (draw_macroicon(8, xx, yy, "Fade in", 0, 0)) {playing = 0 macro_fadein()} xx += 25
1017-
if (draw_macroicon(9, xx, yy, "Fade out", 0, 0)) {playing = 0 macro_fadeout()} xx = x1 + 6
1018-
if (draw_macroicon(10, xx, yy + 16, "Replace key", 0, 0)) {playing = 0 macro_replacekey()} xx += 25
1019-
if (draw_macroicon(11, xx, yy + 16, "Set velocity...", 0, 0)) {playing = 0 window = w_setvelocity} xx += 25
1020-
if (draw_macroicon(12, xx, yy + 16, "Set panning...", 0, 0)) {playing = 0 window = w_setpanning} xx += 25
1021-
if (draw_macroicon(13, xx, yy + 16, "Set pitch...", 0, 0)) {playing = 0 window = w_setpitch} xx += 25
1022-
if (draw_macroicon(14, xx, yy + 16, "Reset all properties", 0, 0)) {playing = 0 macro_reset()} xx += 25
1024+
if (draw_macroicon(9, xx, yy, "Fade out", 0, 0)) {playing = 0 macro_fadeout()} xx += 25
1025+
if (show_layers) {
1026+
xx = x1 + 6
1027+
yy += 16
1028+
}
1029+
if (draw_macroicon(10, xx, yy, "Replace key", 0, 0)) {playing = 0 macro_replacekey()} xx += 25
1030+
if (draw_macroicon(11, xx, yy, "Set velocity...", 0, 0)) {playing = 0 window = w_setvelocity} xx += 25
1031+
if (draw_macroicon(12, xx, yy, "Set panning...", 0, 0)) {playing = 0 window = w_setpanning} xx += 25
1032+
if (draw_macroicon(13, xx, yy, "Set pitch...", 0, 0)) {playing = 0 window = w_setpitch} xx += 25
1033+
if (draw_macroicon(14, xx, yy, "Reset all properties", 0, 0)) {playing = 0 macro_reset()} xx += 25
10231034
}
10241035

10251036
// Tabs

0 commit comments

Comments
 (0)