@@ -8,7 +8,7 @@ local sin=math.sin
8
8
9
9
local totalBgmCount
10
10
11
- local selected ,fullband ,section
11
+ local selected ,richloop , fullband ,section
12
12
local collectCount = 0
13
13
local noProgress = false
14
14
local autoplay = false --- @type number | false
@@ -53,11 +53,13 @@ local musicListBox do
53
53
selected = musicListBox :getItem ()
54
54
local fullbandMode = SONGBOOK [selected ].intensity and (noProgress or PROGRESS .getBgmUnlocked (selected )== 2 )
55
55
local sectionMode = SONGBOOK [selected ].section and (noProgress or PROGRESS .getBgmUnlocked (selected )== 2 )
56
+ local loopMode = SONGBOOK [selected ].hasloop
56
57
scene .widgetList .fullband :setVisible (fullbandMode )
57
58
scene .widgetList .section :setVisible (sectionMode )
58
- scene .widgetList .progressBar .fillColor = SONGBOOK [selected ].looppoint and COLOR .LD or COLOR .L
59
+ scene .widgetList .progressBar .fillColor = SONGBOOK [selected ].hasloop and COLOR .LD or COLOR .L
59
60
if fullbandMode then fullband = fullband == true else fullband = nil end
60
61
if sectionMode then section = section == true else section = nil end
62
+ if loopMode then richloop = true else richloop = nil end
61
63
playBgm (selected ,fullband ,noProgress )
62
64
end
63
65
end
@@ -366,7 +368,8 @@ scene.widgetList={
366
368
{type = ' button_invis' ,pos = {.5 ,.5 },x = 0 ,y = 360 ,w = 160 ,cornerR = 80 ,text = CHAR .icon .stop ,fontSize = 90 ,code = WIDGET .c_pressKey ' space' ,visibleTick = function () return FMOD .music .getPlaying () end },
367
369
368
370
-- Auto Switching Switch
369
- {type = ' switch' ,pos = {.5 ,.5 },x =- 650 ,y = 150 ,h = 50 ,widthLimit = 260 ,labelPos = ' right' ,disp = function () return autoplay end ,
371
+ {type = ' switch' ,pos = {.5 ,.5 },x =- 650 ,y = 90 ,h = 50 ,widthLimit = 260 ,labelPos = ' right' ,
372
+ disp = function () return autoplay end ,
370
373
name = ' autoplay' ,text = LANG ' musicroom_autoplay' ,
371
374
sound_on = false ,sound_off = false ,
372
375
code = function ()
@@ -379,8 +382,24 @@ scene.widgetList={
379
382
end ,
380
383
},
381
384
385
+ -- Richloop Switch
386
+ {type = ' switch' ,pos = {.5 ,.5 },x =- 650 ,y = 150 ,h = 50 ,widthLimit = 260 ,labelPos = ' right' ,
387
+ disp = function () return richloop end ,
388
+ name = ' autoplay' ,text = LANG ' musicroom_richloop' ,
389
+ sound_on = false ,sound_off = false ,
390
+ code = function ()
391
+ richloop =not richloop
392
+ if FMOD .music .getPlaying () then
393
+ FMOD .music .setParam (' loop' ,richloop and 1 or 0 )
394
+ end
395
+ scene .widgetList .progressBar .fillColor = (SONGBOOK [selected ].hasloop and richloop ) and COLOR .LD or COLOR .L
396
+ end ,
397
+ visibleTick = function () return richloop ~= nil end ,
398
+ },
399
+
382
400
-- Fullband Switch
383
- {type = ' switch' ,pos = {.5 ,.5 },x =- 650 ,y = 360 ,h = 50 ,widthLimit = 260 ,labelPos = ' right' ,disp = function () return fullband end ,
401
+ {type = ' switch' ,pos = {.5 ,.5 },x =- 650 ,y = 360 ,h = 50 ,widthLimit = 260 ,labelPos = ' right' ,
402
+ disp = function () return fullband end ,
384
403
name = ' fullband' ,text = LANG ' musicroom_fullband' ,
385
404
sound_on = false ,sound_off = false ,
386
405
code = function ()
@@ -392,13 +411,12 @@ scene.widgetList={
392
411
scene .load ()
393
412
end
394
413
end ,
395
- visibleTick = function ()
396
- return fullband ~= nil
397
- end ,
414
+ visibleTick = function () return fullband ~= nil end ,
398
415
},
399
416
400
417
-- Section Switch
401
- {type = ' switch' ,pos = {.5 ,.5 },x =- 650 ,y = 430 ,h = 50 ,widthLimit = 260 ,labelPos = ' right' ,disp = function () return section end ,
418
+ {type = ' switch' ,pos = {.5 ,.5 },x =- 650 ,y = 430 ,h = 50 ,widthLimit = 260 ,labelPos = ' right' ,
419
+ disp = function () return section end ,
402
420
name = ' section' ,text = LANG ' musicroom_section' ,
403
421
sound_on = false ,sound_off = false ,
404
422
code = function ()
0 commit comments