Skip to content

Commit 5b3ae74

Browse files
OctoFlareDevBentroen
authored andcommitted
Merge branch 'development' of https://github.com/chenxi050402/OpenNoteBlockStudio into development
2 parents d08a9cd + 3cc602f commit 5b3ae74

File tree

8 files changed

+158
-45
lines changed

8 files changed

+158
-45
lines changed

Minecraft Note Block Studio.yyp

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

datafiles/Data/credits.txt

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
*CREDITS
2+
*---
3+
4+
*Originally created by
5+
David Norgren
6+
7+
*Published by
8+
HielkeMinecraft
9+
10+
*Developers
11+
HielkeMinecraft
12+
ShinkoNet
13+
Bentroen
14+
chenxi050402
15+
16+
*Additional designs
17+
LeakyJAZZ
18+
19+
---
20+
21+
*Open-source technologies
22+
23+
Boost.Filesystem|http://www.boost.org/libs/filesystem
24+
by the Boost contributors
25+
26+
FFmpeg|https://www.ffmpeg.org/
27+
by the FFmpeg contributors
28+
29+
LAME|https://lame.sourceforge.io/index.php/
30+
by the LAME contributors
31+
32+
audio-DLL|https://github.com/stuffbydavid/audio-DLL/
33+
by David Norgren
34+
35+
midi-input-DLL|https://github.com/stuffbydavid/midi-input-DLL/
36+
by David Norgren
37+
38+
window-DLL|https://github.com/stuffbydavid/window-DLL/
39+
by David Norgren
40+
41+
file-DLL|https://github.com/stuffbydavid/file-DLL
42+
by David Norgren
43+
44+
7-Zip|https://www.7-zip.org/
45+
by Igor Pavlov
46+
47+
zlib| http://zlib.net/
48+
by Jean-loup Gailly and Mark Adler
49+
50+
Fluent Icons|https://github.com/microsoft/fluentui-system-icons
51+
by Microsoft
52+
53+
NekoPresence|https://github.com/nkrapivin/NekoPresence/
54+
by Nikita Krapivin
55+
56+
Dialog Module|https://marketplace.yoyogames.com/assets/6621/dialog-module
57+
by Samuel Venable
58+
59+
ExecuteShell|https://marketplace.yoyogames.com/assets/575/execute-shell
60+
by Samuel Venable
61+
62+
File Dropper|https://marketplace.yoyogames.com/assets/8207/file-dropper
63+
by Samuel Venable
64+
65+
66+
67+
68+
---
69+
70+
71+
72+
*Special thanks
73+
to the entire note block community
74+
for making OpenNBS what it is!
75+
76+
77+
78+
---
79+
80+
81+

scripts/control_create/control_create.gml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ function control_create() {
299299
midi_sb4 = create_scrollbar(1)
300300
sch_exp_scrollbar = create_scrollbar(1)
301301
update_scrollbar = create_scrollbar(1)
302+
credits_scrollbar = create_scrollbar(1)
302303
sbh_anim = 0
303304
sbv_anim = 0
304305
showinsbox = 0
@@ -456,6 +457,7 @@ function control_create() {
456457
downloaded_size = 0
457458
total_size = -1
458459
changelogstr = load_text(data_directory + "changelog.txt")
460+
creditsstr = load_text(data_directory + "credits.txt")
459461
if (file_exists_lib(settings_file) && string_char_at(vers, 3) < string_char_at(version, 3)) {
460462
if (theme = 2) fdark = 1
461463
theme = 3 // Sets to the Fluent theme when updated

scripts/control_draw/control_draw.gml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,7 @@ function control_draw() {
14821482
else show_menu_ext("settingsp", 29, 19, icon(icons.INFORMATION) + "Song info...|" + "Song stats...|-|" + "Preferences...")
14831483
}
14841484
if (draw_tab("Help")) {
1485-
show_menu_ext("help", 109 - 30 * isplayer, 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...")
1485+
show_menu_ext("help", 109 - 30 * isplayer, 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) + "Website...|GitHub...|Minecraft Forums topic...|Minecraft Wiki page...|-|Changelist...|About...")
14861486
}
14871487
} else {
14881488
if (draw_tab("文件")) {
@@ -1568,7 +1568,7 @@ function control_draw() {
15681568
else show_menu_ext("settingsp", 29, 19, icon(icons.INFORMATION) + "歌曲信息......|" + "歌曲数据......|-|" + "首选项......")
15691569
}
15701570
if (draw_tab("帮助")) {
1571-
show_menu_ext("help", 109 - 30 * isplayer, 19, icon(icons.HELP) + "教程视频|\\|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$观看所有|/|-|" + icon(icons.INTERNET) + "Minecraft Forums 帖子......|Minecraft Wiki 页面......|-|更新历史......|关于......|GitHub......")
1571+
show_menu_ext("help", 109 - 30 * isplayer, 19, icon(icons.HELP) + "教程视频|\\|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$观看所有|/|-|" + icon(icons.INTERNET) + "Website......|GitHub......|Minecraft Forums 帖子......|Minecraft Wiki 页面......|-|更新历史......|关于......")
15721572
}
15731573
}
15741574

@@ -1727,7 +1727,7 @@ function control_draw() {
17271727
if (draw_icon(icons.HELP, xx, yy, "Watch tutorial videos")) {
17281728
open_url("http://www.youtube.com/playlist?list=PL7EA4F0D271DA6E86")
17291729
} xx += 25 if (xx > rw - 190) break
1730-
if (draw_icon(icons.INTERNET, xx, yy, "Visit the Minecraft Forums topic")) {open_url(link_topic)} xx += 25 if (xx > rw - 190) break
1730+
if (draw_icon(icons.INTERNET, xx, yy, "Visit the Open Note Block Studio website")) {open_url(link_website)} xx += 25 if (xx > rw - 190) break
17311731
break
17321732
}
17331733
} else {
Lines changed: 60 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
function draw_window_about() {
22
// draw_window_stats()
3-
var x1, y1, a, n;
3+
var x1, y1, a;
44
windowanim = 1
55
if (theme = 3) draw_set_alpha(windowalpha)
6-
x1 = floor(rw / 2 - 150)
7-
y1 = floor(rh / 2 - 200) + windowoffset
8-
draw_window(x1, y1, x1 + 300, y1 + 400)
6+
x1 = floor(rw / 2 - 290)
7+
y1 = floor(rh / 2 - 205) + windowoffset
8+
draw_window(x1, y1, x1 + 580, y1 + 410)
99
draw_theme_font(font_main)
1010
if (language != 1) draw_text_dynamic(x1 + 8, y1 + 8, "About")
1111
else draw_text_dynamic(x1 + 8, y1 + 8, "关于")
@@ -28,42 +28,66 @@ function draw_window_about() {
2828
}
2929
}
3030
draw_set_halign(fa_left)
31-
if (draw_button2(x1 + 120, y1 + 370, 72, "确定", false) && windowopen = 1) windowclose = 1
32-
window_set_cursor(cr_default)
33-
if (windowopen = 0 && theme = 3) {
34-
if (windowalpha < 1) {
35-
if (refreshrate = 0) windowalpha += 1/3.75
36-
else if (refreshrate = 1) windowalpha += 1/7.5
37-
else if (refreshrate = 2) windowalpha += 1/15
38-
else if (refreshrate = 3) windowalpha += 1/18
39-
else windowalpha += 1/20
40-
} else {
41-
windowalpha = 1
42-
windowopen = 1
31+
32+
// Credits box
33+
var xx, yy, w, n, fullstr, str, strb, strurl;
34+
fullstr = creditsstr;
35+
xx = x1 + 295
36+
yy = y1 + 35
37+
w = 260
38+
draw_area(xx, yy, xx + w, yy + 322)
39+
n = string_count("\n", fullstr)
40+
for (a = 0; a < n; a += 1) {
41+
str[a] = string_copy(fullstr, 1, string_pos("\n", fullstr) - 1)
42+
strb[a] = 0
43+
strurl[a] = ""
44+
if (string_char_at(str[a], 1) = "*") { // Title
45+
strb[a] = 1
46+
str[a] = string_delete(str[a], 1, 1);
47+
}
48+
if (string_pos("|", str[a]) > 0) { // Hyperlink
49+
var split = string_pos("|", str[a])
50+
strurl[a] = string_copy(str[a], split + 1, string_length(str[a]) - split)
51+
str[a] = string_copy(str[a], 1, split - 1)
4352
}
53+
fullstr = string_delete(fullstr, 1, string_pos("\n", fullstr))
4454
}
45-
if(theme = 3) {
46-
if (windowclose = 1) {
47-
if (windowalpha > 0) {
48-
if (refreshrate = 0) windowalpha -= 1/3.75
49-
else if (refreshrate = 1) windowalpha -= 1/7.5
50-
else if (refreshrate = 2) windowalpha -= 1/15
51-
else if (refreshrate = 3) windowalpha -= 1/18
52-
else windowalpha -= 1/20
53-
} else {
54-
windowalpha = 0
55-
windowclose = 0
56-
windowopen = 0
57-
window = 0
58-
window_set_cursor(curs)
59-
save_settings()
60-
}
55+
for (a = sb_val[credits_scrollbar]; a < sb_val[credits_scrollbar] + 19; a += 1) {
56+
if (a >= n) break
57+
58+
var xx2 = xx + (w/2)
59+
var yy2 = yy + 9 + 16 * (a - sb_val[credits_scrollbar])
60+
61+
if (strb[a]) {
62+
draw_theme_font(font_main_bold)
63+
} else {
64+
draw_theme_font(font_main)
6165
}
62-
} else {
63-
if (windowclose = 1) {
64-
windowclose = 0
65-
window = 0
66+
draw_set_halign(fa_center)
67+
68+
if (strurl[a] != "") {
69+
draw_text_url(xx2, yy2, str[a], strurl[a])
70+
} else {
71+
draw_text(xx2, yy2, str[a])
6672
}
6773
}
74+
draw_theme_font(font_main)
75+
draw_scrollbar(credits_scrollbar, xx + w - 17, yy + 1, 16, 18, n, 0, 1)
76+
draw_set_halign(fa_left)
77+
// End credits box
78+
79+
if (draw_button2(x1 + 36, y1 + 380, 72, "Website...", false)) {
80+
open_url(link_github)
81+
}
82+
if (draw_button2(x1 + 112, y1 + 380, 72, "GitHub...", false)) {
83+
open_url(link_website)
84+
}
85+
if (draw_button2(x1 + 188, y1 + 380, 72, "Discord...", false)) {
86+
open_url(link_discord)
87+
}
88+
89+
if (draw_button2(x1 + 580 - 72 - 8, y1 + 380, 72, "OK", false) && (windowopen = 1 || theme != 3)) {
90+
windowclose = 1
91+
}
6892
if (array_length(text_mouseover) = 0) window_set_cursor(cr_default)
6993
}

scripts/draw_window_greeting/draw_window_greeting.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function draw_window_greeting() {
6161
if (language != 1) draw_text_center(x1 + 132, y1 + 280, "Open source Minecraft Note Block Studio")
6262
else draw_text_center(x1 + 132, y1 + 280, "开源 Minecraft Note Block Studio")
6363
draw_set_color(make_color_rgb(62, 144, 255))
64-
draw_text_url(x1 + 132, y1 + 296, "opennbs.org", "https://git.io/fjQH3")
64+
draw_text_url(x1 + 132, y1 + 296, "opennbs.org", link_website)
6565
draw_theme_color()
6666
if (language != 1) draw_text_center(x1 + 132, y1 + 340, "Original created by David Norgren")
6767
else draw_text_center(x1 + 132, y1 + 340, "原作者 David Norgren")

scripts/macros/macros.gml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ function macros() {
88

99
#macro link_download "https://hielkeminecraft.github.io/OpenNoteBlockStudio/"
1010
#macro link_topic "https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-tools/2945101-open-minecraft-note-block-studio"
11+
#macro link_wiki "http://minecraft.gamepedia.com/Programs_and_editors/Minecraft_Note_Block_Studio"
12+
#macro link_github "https://github.com/HielkeMinecraft/OpenNoteBlockStudio"
13+
#macro link_website "https://hielkeminecraft.github.io/OpenNoteBlockStudio"
14+
#macro link_discord "https://discord.gg/sKPGjyVcyy"
1115

1216
#macro file_directory game_save_id
1317
#macro data_directory working_directory + "Data\\"

scripts/menu_click/menu_click.gml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,12 @@ function menu_click(argument0) {
188188
if (sel = 4) open_url("https://www.bilibili.com/video/BV1Mx411a76p?p=4")
189189
if (sel = 5) open_url("https://www.bilibili.com/video/BV1Mx411a76p")
190190
}
191-
if (sel = 6) open_url(link_topic)
192-
if (sel = 7) open_url("http://minecraft.gamepedia.com/Programs_and_editors/Minecraft_Note_Block_Studio")
193-
if (sel = 8) window = w_changelist
194-
if (sel = 9) window = w_about
195-
if (sel = 10) open_url("https://github.com/HielkeMinecraft/OpenNoteBlockStudio")
191+
if (sel = 6) open_url(link_website)
192+
if (sel = 7) open_url(link_github)
193+
if (sel = 8) open_url(link_topic)
194+
if (sel = 9) open_url(link_wiki)
195+
if (sel = 10) window = w_changelist
196+
if (sel = 11) window = w_about
196197
break
197198
}
198199
case "section": {

0 commit comments

Comments
 (0)