Skip to content

Commit eaf7e62

Browse files
committed
Converting to open source
1 parent 4625011 commit eaf7e62

File tree

7 files changed

+29
-14
lines changed

7 files changed

+29
-14
lines changed

scripts/control_create/control_create.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ load_settings()
276276
change_theme()
277277
if (show_welcome) window = w_greeting
278278
if (check_update)
279-
update_http = http_get("http://www.stuffbydavid.com/stuff/mcnbs/version.txt")
279+
update_http = http_get("https://api.github.com/repos/HielkeMinecraft/OpenNoteBlockStudio/releases/latest")
280280
else
281281
update_http = -1
282282
if (file_exists_lib(data_directory + "settings.file") && vers != version) {

scripts/control_draw/control_draw.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ if (draw_tab("Settings")) {
738738
icon(icons.INSTRUMENTS)+"Instrument settings...|/|-|" + icon(icons.INFORMATION) + "Song info...|" + icon(icons.PROPERTIES) + "Song properties...|Song stats...|-|" + icon(icons.MIDI_INPUT) + "MIDI device manager|Preferences...")
739739
}
740740
if (draw_tab("Help")) {
741-
show_menu_ext("help", 109, 19, icon(icons.HELP) + "Tutorial videos|\\|Part 1: Composing note block music|Part 2: Opening MIDI files|Part 3: Importing songs into Minecraft|Part 4: Editing songs made in Minecraft|-|F1$View all|/|-|" + icon(icons.INTERNET) + "Minecraft Forums topic...|Minecraft Wiki page...|-|Changelist...|About...|My website")
741+
show_menu_ext("help", 109, 19, icon(icons.HELP) + "Tutorial videos|\\|Part 1: Composing note block music|Part 2: Opening MIDI files|Part 3: Importing songs into Minecraft|Part 4: Editing songs made in Minecraft|-|F1$View all|/|-|" + icon(icons.INTERNET) + "Minecraft Forums topic...|Minecraft Wiki page...|-|Changelist...|About...|Github")
742742
}
743743

744744
// Icons

scripts/control_http/control_http.gml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ if (async_load[? "id"] = update_http) {
55
if (async_load[? "http_status"] = 200) {
66
var res = async_load[? "result"];
77
if (is_string(res)) {
8-
if (string_count(".", res) = 2) {
9-
if (res = version) {
8+
res = json_decode(res)
9+
var newVersion = string_replace(res[?"tag_name"],"v","")
10+
if (string_count(".", newVersion) = 2) {
11+
if (newVersion = version) {
1012
update = 2
1113
} else {
12-
if (question("Version " + res + " is available! Do you want to download it?", "Update available!")) open_url(link_download)
14+
if (question("Version " + newVersion + " is available! Do you want to download it?", "Update available!")) open_url(link_download)
1315
update = 1
1416
}
1517
}

scripts/draw_window_about/draw_window_about.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ draw_sprite(spr_logo, 0, x1 + 86, y1 + 40)
99
draw_set_halign(fa_center)
1010
draw_text(x1 + 150, y1 + 200, "Open Minecraft Note Block Studio")
1111
draw_set_font(fnt_main)
12-
draw_text(x1 + 150, y1 + 212, "Version " + version + " - Released " + version_date + "\n\nThis program is a property of David Norgren, \nwith the exception of the audio files.\n\nThis product is not affiliated with\nMojang AB, Microsoft or the game Minecraft.")
12+
draw_text(x1 + 150, y1 + 212, "Version " + version + " - Released " + version_date + "\n\nThis program is continuation of\n Minecraft Note Block Studio, created by David Norgren. \n\nThis product is not affiliated with\nMojang AB, Microsoft or the game Minecraft.")
1313
draw_set_halign(fa_left)
1414
if (draw_button2(x1 + 120, y1 + 320, 72, "OK", false)) window = 0

scripts/draw_window_greeting/draw_window_greeting.gml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ y1 = floor(window_height / 2 - 210)
66
draw_window(x1, y1, x1 + 700, y1 + 430)
77
draw_sprite(spr_logo, 0, x1 + 64, y1 + 64)
88
draw_set_font(fnt_mainbold)
9-
draw_text_center(x1 + 132, y1 + 220, "Minecraft Note Block Studio")
9+
draw_text_center(x1 + 132, y1 + 220, "Open Minecraft Note Block Studio")
1010
if (check_update) {
1111
if (update = -1) {
1212
draw_set_color(c_red)
@@ -35,11 +35,24 @@ if (check_update) {
3535
draw_set_font(fnt_main)
3636
draw_set_color(c_black)
3737
draw_text_center(x1 + 132, y1 + 233, "Version " + version + " - Released " + version_date)
38-
draw_text(x1 + 52, y1 + 280, "Created by David Norgren")
38+
draw_text_center(x1 + 132, y1 + 280, "Open source Minecraft Note Block Studio")
3939
draw_set_color(c_blue)
40-
draw_text(x1 + 52, y1 + 296, "www.stuffbydavid.com")
41-
draw_line(x1 + 52, y1 + 309, x1 + 165, y1 + 309)
42-
a = mouse_rectangle(x1 + 52, y1 + 302, 114, 12)
40+
draw_text_center(x1 + 132, y1 + 296, "www.git.io/fh2fJ")
41+
draw_line(x1 + 90, y1 + 309, x1 + 173, y1 + 309)
42+
43+
a = mouse_rectangle(x1 + 90, y1 + 298, 85, 12)
44+
if (a) {
45+
curs = cr_handpoint
46+
if (mouse_check_button_pressed(mb_left))
47+
open_url("https://github.com/HielkeMinecraft/OpenNoteBlockStudio")
48+
}
49+
50+
draw_set_color(c_black)
51+
draw_text_center(x1 + 132, y1 + 340, "Original created by David Norgren")
52+
draw_set_color(c_blue)
53+
draw_text_center(x1 + 132, y1 + 356, "www.stuffbydavid.com")
54+
draw_line(x1 + 74, y1 + 369, x1 + 187, y1 + 369)
55+
a = mouse_rectangle(x1 + 75, y1 + 358, 114, 12)
4356
if (a) {
4457
curs = cr_handpoint
4558
if (mouse_check_button_pressed(mb_left))

scripts/macros/macros.gml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#macro version_date "2019.01.20"
33
#macro version "3.3.5"
44

5-
#macro link_download "http://www.stuffbydavid.com/mcnbs"
6-
#macro link_topic "http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tools/1260747-minecraft-note-block-studio"
5+
#macro link_download "https://github.com/HielkeMinecraft/OpenNoteBlockStudio/releases/latest"
6+
#macro link_topic "https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-tools/2945101-open-minecraft-note-block-studio"
77

88
#macro file_directory game_save_id
99
#macro data_directory working_directory + "Data\\"

scripts/menu_click/menu_click.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ switch (m) {
131131
if (sel = 7) open_url("http://minecraft.gamepedia.com/Programs_and_editors/Minecraft_Note_Block_Studio")
132132
if (sel = 8) window = w_changelist
133133
if (sel = 9) window = w_about
134-
if (sel = 10) open_url("http://www.stuffbydavid.com")
134+
if (sel = 10) open_url("https://github.com/HielkeMinecraft/OpenNoteBlockStudio")
135135
break
136136
}
137137
case "section": {

0 commit comments

Comments
 (0)