From ea78673811c3b1457695dfed93f17a8764ab5072 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 26 Mar 2021 19:53:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmusic=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E6=B2=A1=E6=9C=89bgm=E4=BC=9A=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/music.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/parts/scenes/music.lua b/parts/scenes/music.lua index cf03990d..796a88fa 100644 --- a/parts/scenes/music.lua +++ b/parts/scenes/music.lua @@ -7,6 +7,9 @@ local scene={} local selected--Music selected local bgmList=BGM.getList() +if #bgmList==0 then + bgmList={"[NO BGM]"} +end function scene.sceneInit() if BGM.nowPlay then for i=1,BGM.getCount()do @@ -15,9 +18,8 @@ function scene.sceneInit() return end end - else - selected=1 end + selected=1 end function scene.wheelMoved(_,y) @@ -56,10 +58,10 @@ function scene.draw() gc.print(bgmList[selected],320,355) setFont(35) if selected>1 then gc.print(bgmList[selected-1],320,350-30)end - if selected2 then gc.print(bgmList[selected-2],320,350-50)end - if selected