修复音乐室暂停就报错(之前合并分支选错一边)

框架跟进(修复说明书界面报错)
This commit is contained in:
MrZ_26
2022-10-26 05:34:11 +08:00
parent b101d74df5
commit 10a57ecc18
2 changed files with 3 additions and 3 deletions

View File

@@ -45,7 +45,6 @@ function scene.keyDown(key,isRep)
end end
elseif not isRep then elseif not isRep then
if key=='return' or key=='space' then if key=='return' or key=='space' then
playing=BGM.getPlaying()[1]
if playing~=bgmList[S] then if playing~=bgmList[S] then
BGM.play(bgmList[S]) BGM.play(bgmList[S])
SFX.play('click') SFX.play('click')
@@ -53,6 +52,7 @@ function scene.keyDown(key,isRep)
BGM.stop() BGM.stop()
SFX.play('click') SFX.play('click')
end end
playing=BGM.getPlaying()[1]
elseif key=='tab' then elseif key=='tab' then
SCN.swapTo('launchpad','none') SCN.swapTo('launchpad','none')
elseif key=='escape' then elseif key=='escape' then
@@ -128,7 +128,7 @@ scene.widgetList={
WIDGET.newText{name='arrow', x=270,y=360,font=45,align='L'}, WIDGET.newText{name='arrow', x=270,y=360,font=45,align='L'},
WIDGET.newText{name='now', x=700,y=500,font=50,align='R',hideF=function() return not playing end}, WIDGET.newText{name='now', x=700,y=500,font=50,align='R',hideF=function() return not playing end},
WIDGET.newSlider{name='slide',x=480,y=600,w=400, WIDGET.newSlider{name='slide',x=480,y=600,w=400,
disp=function() return BGM.tell()/BGM.getDuration()%1 end, disp=function() return playing and BGM.tell()/BGM.getDuration()%1 end,
show=false, show=false,
code=function(v) BGM.set('all','seek',v*BGM.getDuration()) end, code=function(v) BGM.set('all','seek',v*BGM.getDuration()) end,
hideF=function() return not playing end hideF=function() return not playing end