Skip to content

Commit 6eab5b0

Browse files
committed
音乐室添加富循环开关
1 parent 95bc0b1 commit 6eab5b0

File tree

5 files changed

+30
-8
lines changed

5 files changed

+30
-8
lines changed

assets/language/lang_en.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ local L={
213213
main_out_multi="Multiple",
214214

215215
musicroom_title="Musicroom",
216+
musicroom_richloop="Rich Loop",
216217
musicroom_fullband="Full Band",
217218
musicroom_section='Chorus',
218219
musicroom_autoplay="Auto Change",

assets/language/lang_eo.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ local L={
213213
main_out_multi="Multoblaj",
214214

215215
musicroom_title="Muzika ĉambro",
216+
-- musicroom_richloop="Rich Loop",
216217
musicroom_fullband="Plena Bando",
217218
musicroom_section='Koruso',
218219
musicroom_autoplay="Aŭtomata kantoŝanĝo",

assets/language/lang_it.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ local L={
213213
main_out_multi="Multigiocatore",
214214

215215
musicroom_title="Stanza musicale",
216+
-- musicroom_richloop="Rich Loop",
216217
musicroom_fullband="Banda Piena",
217218
musicroom_section='Coro',
218219
musicroom_autoplay="Cambio automatico",

assets/language/lang_zh.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ local L={
213213
main_out_multi="联机",
214214

215215
musicroom_title="音乐室",
216+
musicroom_richloop="富循环",
216217
musicroom_fullband='全频带',
217218
musicroom_section='副歌',
218219
musicroom_autoplay="自动切换",

assets/scene/musicroom.lua

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ local sin=math.sin
88

99
local totalBgmCount
1010

11-
local selected,fullband,section
11+
local selected,richloop,fullband,section
1212
local collectCount=0
1313
local noProgress=false
1414
local autoplay=false ---@type number | false
@@ -53,11 +53,13 @@ local musicListBox do
5353
selected=musicListBox:getItem()
5454
local fullbandMode=SONGBOOK[selected].intensity and (noProgress or PROGRESS.getBgmUnlocked(selected)==2)
5555
local sectionMode=SONGBOOK[selected].section and (noProgress or PROGRESS.getBgmUnlocked(selected)==2)
56+
local loopMode=SONGBOOK[selected].hasloop
5657
scene.widgetList.fullband:setVisible(fullbandMode)
5758
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
5960
if fullbandMode then fullband=fullband==true else fullband=nil end
6061
if sectionMode then section=section==true else section=nil end
62+
if loopMode then richloop=true else richloop=nil end
6163
playBgm(selected,fullband,noProgress)
6264
end
6365
end
@@ -366,7 +368,8 @@ scene.widgetList={
366368
{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},
367369

368370
-- 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,
370373
name='autoplay',text=LANG'musicroom_autoplay',
371374
sound_on=false,sound_off=false,
372375
code=function()
@@ -379,8 +382,24 @@ scene.widgetList={
379382
end,
380383
},
381384

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+
382400
-- 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,
384403
name='fullband',text=LANG'musicroom_fullband',
385404
sound_on=false,sound_off=false,
386405
code=function()
@@ -392,13 +411,12 @@ scene.widgetList={
392411
scene.load()
393412
end
394413
end,
395-
visibleTick=function()
396-
return fullband~=nil
397-
end,
414+
visibleTick=function() return fullband~=nil end,
398415
},
399416

400417
-- 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,
402420
name='section',text=LANG'musicroom_section',
403421
sound_on=false,sound_off=false,
404422
code=function()

0 commit comments

Comments
 (0)