Skip to content

Commit 3c0e429

Browse files
committed
Fixed issues mentioned in PR OpenNBS#247
1 parent 6498ef9 commit 3c0e429

File tree

29 files changed

+65
-30
lines changed

29 files changed

+65
-30
lines changed

scripts/control_draw/control_draw.gml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -776,22 +776,26 @@ function control_draw() {
776776
a = starta
777777
b = startb
778778
if (mouse_x > x1 + 2 + 32 * totalcols - 32) {
779-
dragincxr += 0.1
779+
if (refreshrate >= 2) dragincxr += 0.025
780+
else dragincxr += 0.1
780781
dragincxr = min(dragincxr, 4)
781782
starta += ceil(dragincxr)
782783
} else dragincxr = 0
783784
if (mouse_x < x1 + 32) {
784-
dragincxl += 0.1
785+
if (refreshrate >= 2) dragincxl += 0.025
786+
else dragincxl += 0.1
785787
dragincxl = min(dragincxl, 4)
786788
starta -= ceil(dragincxl)
787789
} else dragincxl = 0
788790
if (mouse_y > y1 + 34 + totalrows * 32) {
789-
dragincyd += 0.1
791+
if (refreshrate >= 2) dragincyd += 0.025
792+
else dragincyd += 0.1
790793
dragincyd = min(dragincyd, 4)
791794
startb += ceil(dragincyd)
792795
} else dragincyd = 0
793796
if (mouse_y < y1 + 34 + 32) {
794-
dragincyu += 0.1
797+
if (refreshrate >= 2) dragincyu += 0.025
798+
else dragincyu += 0.1
795799
dragincyu = min(dragincyu, 4)
796800
startb -= ceil(dragincyu)
797801
} else dragincyu = 0
@@ -1479,16 +1483,18 @@ function control_draw() {
14791483

14801484
if (!fullscreen && show_layers) {
14811485
// Marker position
1482-
draw_set_halign(fa_right)
1486+
if (theme != 3) draw_set_halign(fa_right)
14831487
draw_theme_color()
14841488
draw_set_font(fnt_info_med_bold)
14851489
if (theme = 3) draw_set_font(fnt_wslui_info_med_bald)
1486-
draw_text(93, 52, time_str(marker_pos / tempo))
1490+
if (theme != 3) draw_text(93, 52, time_str(marker_pos / tempo))
1491+
else draw_text(93 - 84, 52, time_str(marker_pos / tempo))
14871492

14881493
// Song length
14891494
draw_set_font(fnt_small)
14901495
if (theme = 3) draw_set_font(fnt_wslui_small)
1491-
draw_text(93, 69, "/ " + time_str(enda / tempo))
1496+
if (theme != 3) draw_text(93, 69, "/ " + time_str(enda / tempo))
1497+
else draw_text(93 - 67, 69, "/ " + time_str(enda / tempo))
14921498
draw_set_font(fnt_main)
14931499
if (theme = 3) draw_set_font(fnt_wslui)
14941500

scripts/draw_button2/draw_button2.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function draw_button2() {
2020
draw_sprite_ext(spr_button, 46, xx + 3, yy, w / 3 - 2, 1, 0, -1, 1)
2121
draw_sprite(spr_button, 45, xx, yy)
2222
draw_sprite(spr_button, 47, xx + w - 3, yy)
23-
draw_set_color(10526880)
23+
draw_set_color(8355711)
2424
}
2525
} else {
2626
m = mouse_rectangle(xx, yy, w, 23) && w_isdragging = 0

scripts/draw_text_url/draw_text_url.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function draw_text_url(argument0, argument1, argument2, argument3) {
2323
}
2424
if (theme != 3) draw_set_color(make_color_rgb(62, 144, 255))
2525
draw_text_center(xx, yy, text)
26-
if (theme != 3) draw_line(xx - floor(width/2) - 1, yy + 12, xx + ceil(width/2) - 1, yy + 13)
26+
draw_line(xx - floor(width/2) - 1, yy + 12, xx + ceil(width/2) - 1, yy + 13)
2727
draw_theme_color()
2828

2929

scripts/draw_window/draw_window.gml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
function draw_window(argument0, argument1, argument2, argument3) {
2-
// draw_window(x1, y1, x2, y2)
3-
var x1, y1, x2, y2;
4-
x1 = argument0
5-
y1 = argument1
6-
x2 = argument2
7-
y2 = argument3
1+
function draw_window() {
2+
// draw_window(x1, y1, x2, y2[, sml])
3+
var x1, y1, x2, y2, sml;
4+
x1 = argument[0]
5+
y1 = argument[1]
6+
x2 = argument[2]
7+
y2 = argument[3]
8+
sml = 0
9+
if (argument_count > 4) {
10+
sml = argument[4]
11+
}
812
draw_set_color(15790320)
913
if (theme = 1) draw_set_color(13160660)
1014
if (theme = 2) draw_set_color(c_dark)
1115
if (theme = 3) draw_set_color(c_white)
12-
if (theme = 3) {
16+
if (theme = 3 && sml = 0) {
1317
draw_sprite(spr_shadow, 0, x1 - 16, y1 - 16)
1418
draw_sprite_ext(spr_shadow, 1, x1 - 16, y1, 1, y2 - y1, 0, -1, 1)
1519
draw_sprite(spr_shadow, 2, x1 - 16, y2 + 1)

scripts/draw_window_instruments/draw_window_instruments.gml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,24 @@ function draw_window_instruments() {
1919
draw_set_color(make_color_rgb(137, 140, 149))
2020
draw_rectangle(x1 + 12, y1 + 66, x1 + 535, y1 + 310, 1)
2121
} else {
22-
draw_area(x1 + 11, y1 + 65, x1 + 535, y1 + 312)
22+
if (theme != 3) draw_area(x1 + 11, y1 + 65, x1 + 535, y1 + 312)
23+
else draw_area(x1 + 11, y1 + 67, x1 + 535, y1 + 312)
2324
}
2425
if (draw_button2(x1 + 455, y1 + 9, 80, "Import")) load_instruments("")
2526
if (draw_button2(x1 + 455, y1 + 36, 80, "Open Folder")) open_url(sounds_directory)
2627
// Tabs
27-
draw_window(x1 + 13 + 194 + 160 + 80, y1 + 67, x1 + 14 + 194 + 160 + 80 + 88, y1 + 67 + 20)
28-
popup_set_window(x1 + 13 + 194 + 160 + 80, y1 + 67, 88, 20, "Whether notes of this type should be\npressed when the marker reaches them.")
29-
draw_text(x1 + 18 + 194 + 160 + 80, y1 + 70, "Press")
30-
draw_window(x1 + 13 + 194 + 160, y1 + 67, x1 + 14 + 194 + 160 + 80, y1 + 67 + 20)
28+
draw_window(x1 + 13 + 194 + 160 + 80, y1 + 67, x1 + 14 + 194 + 160 + 80 + 88 - 1, y1 + 67 + 20, 1)
29+
popup_set_window(x1 + 13 + 194 + 160 + 80 - 1, y1 + 67, 88, 20, "Whether notes of this type should be\npressed when the marker reaches them.")
30+
draw_text(x1 + 18 + 194 + 160 + 80 - 1, y1 + 70, "Press")
31+
draw_window(x1 + 13 + 194 + 160, y1 + 67, x1 + 14 + 194 + 160 + 80, y1 + 67 + 20, 1)
3132
popup_set_window(x1 + 13 + 194 + 160, y1 + 67, 80, 20, "The default key pitch of the sound file.")
3233
draw_text(x1 + 18 + 194 + 160, y1 + 70, "Pitch")
33-
draw_window(x1 + 13 + 194, y1 + 67, x1 + 14 + 194 + 160, y1 + 67 + 20)
34+
draw_window(x1 + 13 + 194, y1 + 67, x1 + 14 + 194 + 160, y1 + 67 + 20, 1)
3435
popup_set_window(x1 + 13 + 194, y1 + 67, 160, 20, "The sound file of this instrument.")
3536
draw_text(x1 + 18 + 194, y1 + 70, "Sound")
36-
draw_window(x1 + 13, y1 + 67, x1 + 14 + 194, y1 + 67 + 20)
37-
popup_set_window(x1 + 13, y1 + 67, 194, 20, "The name of this instrument.")
38-
draw_text(x1 + 18, y1 + 70, "Name")
37+
draw_window(x1 + 13 - 2, y1 + 67, x1 + 14 + 194, y1 + 67 + 20, 1)
38+
popup_set_window(x1 + 13 - 2, y1 + 67, 194, 20, "The name of this instrument.")
39+
draw_text(x1 + 18 - 2, y1 + 70, "Name")
3940

4041
var sounds = 0;
4142
for (var i = first_custom_index; i <= ds_list_size(instrument_list) - 1; i++) {

scripts/draw_window_preferences/draw_window_preferences.gml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ function draw_window_preferences() {
142142
game_set_speed(60,gamespeed_fps)
143143
refreshrate=1
144144
}
145-
if (draw_radiobox(x1+274+64,y1+164+16,refreshrate == 2,"120FPS","Run the program at 120FPS.")) {
145+
if (draw_radiobox(x1+274+64-6,y1+164+16,refreshrate == 2,"120FPS","Run the program at 120FPS.")) {
146146
game_set_speed(120,gamespeed_fps)
147147
refreshrate=2
148148
}
149-
if (draw_radiobox(x1+274+64,y1+164+16+20,refreshrate == 3,"144FPS","Run the program at 144FPS.")) {
149+
if (draw_radiobox(x1+274+64-6,y1+164+16+20,refreshrate == 3,"144FPS","Run the program at 144FPS.")) {
150150
game_set_speed(144,gamespeed_fps)
151151
refreshrate=3
152152
}
153-
if (draw_radiobox(x1+274+128,y1+164+16+10,refreshrate == 4,"114514FPS","Choose this option with cautious (May cause very high CPU usage).")) {
153+
if (draw_radiobox(x1+274+128-6,y1+164+16+10,refreshrate == 4,"Unlimited","Choose this option with cautious (May cause very high CPU usage).")) {
154154
game_set_speed(114514,gamespeed_fps)
155155
refreshrate=4
156156
}
0 Bytes
Loading
0 Bytes
Loading
0 Bytes
Loading
0 Bytes
Loading

0 commit comments

Comments
 (0)