Skip to content

Commit edf20ba

Browse files
committed
Added instrument shapes toggle. Fixed blank notes
implements #66, fixes #62
1 parent f019088 commit edf20ba

File tree

141 files changed

+615
-1039
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+615
-1039
lines changed

Minecraft Note Block Studio.yyp

Lines changed: 1 addition & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/control_create/control_create.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ collast[0] = -1
100100

101101
show_numbers = 1
102102
show_octaves = 0
103-
use_colored = 1
103+
draw_type = 0
104104
totalblocks = 0
105105

106106
mousewheel = 0

scripts/draw_block/draw_block.gml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ index = ds_list_find_index(instrument_list, ins)
1212
//If index isnt found, don't draw
1313
if(index = -1)return;
1414

15-
if (ins.user || !use_colored)
16-
index = 32
17-
if(theme=2) draw_sprite_ext(spr_altblock, index, xx, yy, 1, 1, 0, -1, alpha)
18-
else draw_sprite_ext(spr_block, index, xx, yy, 1, 1, 0, -1, alpha)
15+
//For custom instruments, pick the last frame from spr_block
16+
if(index >= first_custom_index) {
17+
draw_sprite_ext(spr_block, 48, xx, yy, 1, 1, 0, -1, alpha)
18+
} else {
19+
draw_sprite_ext(spr_block, index + (16 * draw_type), xx, yy, 1, 1, 0, -1, alpha)
20+
}
21+
1922
if (ins.user || key < 33 || key > 57) {
2023
draw_set_color(c_red)
2124
draw_set_alpha(1)
@@ -28,7 +31,7 @@ if (salpha > 0) {
2831
} else {
2932
draw_set_alpha(alpha + 0.25)
3033
}
31-
if (show_numbers) draw_text(xx + 16 - 8 * !use_colored, yy + 16, condstr(key < 33, " < ") + condstr(key > 57, " > ") + condstr(key > 32 && key < 58, string(key - 33)))
34+
if (show_numbers) draw_text(xx + 16 - 8 * (draw_type = 1), yy + 16, condstr(key < 33, " < ") + condstr(key > 57, " > ") + condstr(key > 32 && key < 58, string(key - 33)))
3235
if(theme=2) draw_set_color(c_white)
3336
else draw_set_color(c_yellow)
3437
draw_text(xx + 16, yy + 4, get_keyname(key, show_octaves))

scripts/draw_window_preferences/draw_window_preferences.gml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,28 @@ if (selected_tab = 0) {
9393
}
9494
if (draw_button2(x1 + 22 + 84 + 84, y1 + 286, 96, "Use default")) songfolder = songs_directory
9595
} else if (selected_tab = 1) {
96-
draw_areaheader(x1 + 22, y1 + 74, 456, 140, "Note blocks")
97-
if (draw_radiobox(x1 + 40, y1 + 90, use_colored, "Use colored note blocks", "If the instruments of the note blocks\nshould be recognized by different colors.")) use_colored = 1
98-
if (draw_radiobox(x1 + 40, y1 + 110, !use_colored, "Show instrument icons", "If the instruments of the note blocks should\nbe recognized by their respective icons.")) use_colored = 0
99-
if (draw_checkbox(x1 + 40, y1 + 140, show_numbers, "Show key numbers", "Whether to show the amount of right - clicks required\nfor each note block.")) show_numbers=!show_numbers
100-
if (draw_checkbox(x1 + 40, y1 + 160, show_octaves, "Show octave numbers", "Whether the number of the octave the note block\nis in should be shown.")) show_octaves=!show_octaves
101-
if (draw_checkbox(x1 + 40, y1 + 180, fade, "No Fading", "Disables transparency animations on note block sprites")) {
96+
draw_areaheader(x1 + 22, y1 + 74, 456, 150, "Note blocks")
97+
if (draw_radiobox(x1 + 40, y1 + 90, draw_type = 0, "Use colored note blocks", "If the instruments of the note blocks\nshould be recognized by different colors.")) draw_type = 0
98+
if (draw_radiobox(x1 + 40, y1 + 110, draw_type = 1, "Show instrument icons", "If the instruments of the note blocks should\nbe recognized by their respective icons.")) draw_type = 1
99+
if (draw_radiobox(x1 + 40, y1 + 130, draw_type = 2, "Use different shapes for each instrument", "Whether each instrument should have a different shape\nto make them more distinquisable.")) draw_type = 2
100+
101+
if (draw_checkbox(x1 + 40, y1 + 160, show_numbers, "Show key numbers", "Whether to show the amount of right - clicks required\nfor each note block.")) show_numbers=!show_numbers
102+
if (draw_checkbox(x1 + 40, y1 + 180, show_octaves, "Show octave numbers", "Whether the number of the octave the note block\nis in should be shown.")) show_octaves=!show_octaves
103+
if (draw_checkbox(x1 + 40, y1 + 200, fade, "No Fading", "Disables transparency animations on note block sprites")) {
102104
fade = !fade
103105
if fade = !fade
104106
fade = 1
105107
fadeuser = 1
106108
}
107-
draw_areaheader(x1 + 22, y1 + 220, 456, 120, "Piano")
108-
if (draw_checkbox(x1 + 40, y1 + 236, show_keynames, "Show key names", "If the names of the keys should be shown.")) show_keynames=!show_keynames
109-
if (draw_checkbox(x1 + 40, y1 + 256, show_keyboard, "Show keyboard shortcuts", "Show the keyboard shortcuts of the keys.")) show_keyboard=!show_keyboard
110-
if (draw_checkbox(x1 + 40, y1 + 276, show_notechart, "Show note chart when hovering over keys", "Whether to show a note chart\nwhen hovering over the keys.")) show_notechart=!show_notechart
111-
draw_text(x1 + 40, y1 + 306, "Keys to show:")
112-
keysmax = median(20, draw_dragvalue(3, x1 + 120, y1 + 306, keysmax, 2), 50)
113-
popup_set_window(x1 + 40, y1 + 302, 150, 21, "The amount of keys to show. A high number may\nslow down the program on old computers.")
109+
110+
111+
draw_areaheader(x1 + 22, y1 + 240, 456, 110, "Piano")
112+
if (draw_checkbox(x1 + 40, y1 + 256, show_keynames, "Show key names", "If the names of the keys should be shown.")) show_keynames=!show_keynames
113+
if (draw_checkbox(x1 + 40, y1 + 276, show_keyboard, "Show keyboard shortcuts", "Show the keyboard shortcuts of the keys.")) show_keyboard=!show_keyboard
114+
if (draw_checkbox(x1 + 40, y1 + 296, show_notechart, "Show note chart when hovering over keys", "Whether to show a note chart\nwhen hovering over the keys.")) show_notechart=!show_notechart
115+
draw_text(x1 + 40, y1 + 326, "Keys to show:")
116+
keysmax = median(20, draw_dragvalue(3, x1 + 120, y1 + 326, keysmax, 2), 50)
117+
popup_set_window(x1 + 40, y1 + 322, 150, 21, "The amount of keys to show. A high number may\nslow down the program on old computers.")
114118
} else if (selected_tab = 2) {
115119
draw_areaheader(x1 + 22, y1 + 74, 456, 120, "Mouse wheel")
116120
if (draw_radiobox(x1 + 40, y1 + 90, mousewheel = 0, "Use mouse wheel to scroll through the song", "Use the mouse wheel to scroll through\nthe song horizontally or vertically.")) mousewheel = 0

scripts/load_settings/load_settings.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ theme = buffer_read_byte()
1515
songfolder = buffer_read_string()
1616
show_numbers = buffer_read_byte()
1717
show_octaves = buffer_read_byte()
18-
use_colored = buffer_read_byte()
18+
draw_type = buffer_read_byte()
1919
show_keynames = buffer_read_byte()
2020
show_keyboard = buffer_read_byte()
2121
show_notechart = buffer_read_byte()

scripts/save_settings/save_settings.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ buffer_write_byte(theme)
1414
buffer_write_string(songfolder);
1515
buffer_write_byte(show_numbers)
1616
buffer_write_byte(show_octaves)
17-
buffer_write_byte(use_colored)
17+
buffer_write_byte(draw_type)
1818
buffer_write_byte(show_keynames)
1919
buffer_write_byte(show_keyboard)
2020
buffer_write_byte(show_notechart)
-488 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)