Skip to content

Commit fc21d23

Browse files
committed
Fix no smooth scrolling when manual ff/rev
1 parent aa57321 commit fc21d23

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

scripts/control_draw/control_draw.gml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ function control_draw() {
299299
draw_rectangle(x1 + 2, y1 + 34, x1 + 2 + 32 * totalcols, y1 + 34 + 32 * totalrows, false)
300300
}
301301
}
302-
note_offset = floor(((current_song.marker_pos - floor(current_song.marker_pos + 0.5 * !isplayer)) * 32) + 0.5) * ((playing && marker_follow && marker_pagebypage = 2 && (current_song.marker_pos - floor(totalcols / 2 + 0.5) < current_song.enda + 1 && current_song.marker_pos - floor(totalcols / 2 + 0.5) > 0)) || isplayer)
302+
note_offset = floor(((current_song.marker_pos - floor(current_song.marker_pos + 0.5 * !isplayer)) * 32) + 0.5) * (((forward <> 0 || playing) && marker_follow && marker_pagebypage = 2 && (current_song.marker_pos - floor(totalcols / 2 + 0.5) < current_song.enda + 1 && current_song.marker_pos - floor(totalcols / 2 + 0.5) > 0)) || isplayer)
303303
if (!isplayer) {
304304
var tempo_changer_display_queue = []
305305
for (a = 0; a < totalcols; a += 1) {
@@ -680,8 +680,6 @@ function control_draw() {
680680
sb_val[1] = current_song.startb
681681
}
682682
}
683-
if (keyboard_check(vk_right)) forward = 1
684-
if (keyboard_check(vk_left)) forward = -1
685683
if (keyboard_check_pressed(vk_enter)) {
686684
playing = 0
687685
current_song.marker_pos = 0
@@ -1879,6 +1877,11 @@ function control_draw() {
18791877
show_menu_ext("help", 109 - 30 * isplayer, 19, icon(icons.HELP) + "教程视频|\\|第 1 集:编写音符盒乐曲|第 2 集:打开 MIDI 文件|第 3 集:将乐曲导入进 Minecraft|第 4 集:编辑在 Minecraft 中创作的乐曲 |-|F1$观看所有|/|-|" + icon(icons.INTERNET) + "官方网站......|GitHub......|Discord 服务器......|反馈 bug......|QQ 群......|捐赠......|-|更新历史......|关于......")
18801878
}
18811879
}
1880+
1881+
forward = 0
1882+
// Moved forward/backward controls here for better ordering
1883+
if (keyboard_check(vk_right)) forward = 1
1884+
if (keyboard_check(vk_left)) forward = -1
18821885

18831886
// Icons
18841887
if (theme != 3) {
@@ -1904,7 +1907,7 @@ function control_draw() {
19041907
xx += 25
19051908
if (draw_icon(icons.STOP, xx, yy, "Stop song", 0, 0)) {playing = 0 current_song.marker_pos = 0 current_song.marker_prevpos = 0 timestoloop = real(current_song.loopmax) remove_emitters_all_schedule = 1} xx += 25
19061909
if (isplayer && !dropmode) if (draw_icon(icons.STOP, centerx - 12 - 100, centery + 50, "Stop song", 0, 0)) {playing = 0 current_song.marker_pos = 0 current_song.marker_prevpos = 0 timestoloop = real(current_song.loopmax) remove_emitters_all_schedule = 1}
1907-
forward = 0
1910+
//forward = 0
19081911
if (draw_icon(icons.BACK, xx, yy, "Rewind song", 0, 0)) {forward = -1} xx += 25
19091912
if (isplayer && !dropmode) if (draw_icon(icons.BACK, centerx - 12 - 50, centery + 50, "Rewind song", 0, 0)) {forward = -1}
19101913
if (draw_icon(icons.FORWARD, xx, yy, "Fast-forward song", 0, 0)) {forward = 1} xx += 25
@@ -1937,7 +1940,7 @@ function control_draw() {
19371940
xx += 25
19381941
if (draw_icon(icons.STOP, xx, yy, "停止歌曲", 0, 0)) {playing = 0 current_song.marker_pos = 0 current_song.marker_prevpos = 0 timestoloop = real(current_song.loopmax) remove_emitters_all_schedule = 1} xx += 25
19391942
if (isplayer && !dropmode) if (draw_icon(icons.STOP, centerx - 12 - 100, centery + 50, "停止歌曲", 0, 0)) {playing = 0 current_song.marker_pos = 0 current_song.marker_prevpos = 0 timestoloop = real(current_song.loopmax) remove_emitters_all_schedule = 1}
1940-
forward = 0
1943+
//forward = 0
19411944
if (draw_icon(icons.BACK, xx, yy, "快退", 0, 0)) {forward = -1} xx += 25
19421945
if (isplayer && !dropmode) if (draw_icon(icons.BACK, centerx - 12 - 50, centery + 50, "快退", 0, 0)) {forward = -1}
19431946
if (draw_icon(icons.FORWARD, xx, yy, "快进", 0, 0)) {forward = 1} xx += 25

0 commit comments

Comments
 (0)