From 10a57ecc187a72cab53e76f99f1b680e16053c7c Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Wed, 26 Oct 2022 05:34:11 +0800 Subject: [PATCH] =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E9=9F=B3=E4=B9=90?= =?UTF-8?q?=E5=AE=A4=E6=9A=82=E5=81=9C=E5=B0=B1=E6=8A=A5=E9=94=99=EF=BC=88?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E5=90=88=E5=B9=B6=E5=88=86=E6=94=AF=E9=80=89?= =?UTF-8?q?=E9=94=99=E4=B8=80=E8=BE=B9=EF=BC=89=20=20=E6=A1=86=E6=9E=B6?= =?UTF-8?q?=E8=B7=9F=E8=BF=9B=EF=BC=88=E4=BF=AE=E5=A4=8D=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E4=B9=A6=E7=95=8C=E9=9D=A2=E6=8A=A5=E9=94=99=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework | 2 +- parts/scenes/music.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Zframework b/Zframework index 080c0bc5..0ca5d4bb 160000 --- a/Zframework +++ b/Zframework @@ -1 +1 @@ -Subproject commit 080c0bc5526812cb6d7366a979cef2aaa1f25b54 +Subproject commit 0ca5d4bbad7305ec15b7cd224b030c03ff14c58b diff --git a/parts/scenes/music.lua b/parts/scenes/music.lua index 7cd8afb0..b4a5d25f 100644 --- a/parts/scenes/music.lua +++ b/parts/scenes/music.lua @@ -45,7 +45,6 @@ function scene.keyDown(key,isRep) end elseif not isRep then if key=='return' or key=='space' then - playing=BGM.getPlaying()[1] if playing~=bgmList[S] then BGM.play(bgmList[S]) SFX.play('click') @@ -53,6 +52,7 @@ function scene.keyDown(key,isRep) BGM.stop() SFX.play('click') end + playing=BGM.getPlaying()[1] elseif key=='tab' then SCN.swapTo('launchpad','none') 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='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, - disp=function() return BGM.tell()/BGM.getDuration()%1 end, + disp=function() return playing and BGM.tell()/BGM.getDuration()%1 end, show=false, code=function(v) BGM.set('all','seek',v*BGM.getDuration()) end, hideF=function() return not playing end