From 9bba05f26c4a36c3a6db1d7c64fe71b7ae573fea Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 13 Aug 2021 01:43:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E5=88=AB=E8=B8=A9=E7=99=BD=E5=9D=97=E6=8E=A7=E4=BB=B6=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=98=BE=E9=9A=90=E6=97=B6?= =?UTF-8?q?=E6=9C=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=E5=B9=B6=E7=95=A5=E5=BE=AE?= =?UTF-8?q?=E6=8F=90=E5=8D=87=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_dtw.lua | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/parts/scenes/app_dtw.lua b/parts/scenes/app_dtw.lua index d7ccee6a..0507d060 100644 --- a/parts/scenes/app_dtw.lua +++ b/parts/scenes/app_dtw.lua @@ -36,13 +36,21 @@ local modeSelector=WIDGET.newSelector{name="mode",x=155,y=220,w=280, "Dense_Handstream", "Light_Quadstream", "Quadstream", - },disp=function()return mode end,code=function(m)mode=m end,hideF=function()return state~=0 end + },disp=function()return mode end,code=function(m)mode=m end } local bgmSelector=WIDGET.newSelector{name="bgm",x=155,y=290,w=280,list=BGM.getList(),disp=function()return bgm end,code=function(i)bgm=i BGM.play(i)end} local colorSelector=WIDGET.newSelector{name="color",x=155,y=360,w=280, list={"black","dGray","gray","lGray","dRed","red","lRed","dFire","fire","lFire","dOrange","orange","lOrange","dYellow","yellow","lYellow","dLime","lime","lLime","dJade","jade","lJade","dGreen","green","lGreen","dAqua","aqua","lAqua","dCyan","cyan","lCyan","dNavy","navy","lNavy","dSea","sea","lSea","dBlue","blue","lBlue","dViolet","violet","lViolet","dPurple","purple","lPurple","dMagenta","magenta","lMagenta","dWine","wine","lWine"}, - disp=function()return tileColor end,code=function(m)tileColor=m end,hideF=function()return state~=0 end + disp=function()return tileColor end,code=function(m)tileColor=m end } +local arcadeSwitch=WIDGET.newSwitch{name="arcade", x=230,y=430,font=40,disp=function()return arcade end,code=pressKey"e"} +local function freshSelectors() + local f=state~=0 + modeSelector.hide=f + bgmSelector.hide=f + colorSelector.hide=f + arcadeSwitch.hide=f +end local score local pos,height @@ -165,7 +173,9 @@ local function reset() keyTime={}for i=1,40 do keyTime[i]=-1e99 end speed,maxSpeed=0,0 progress={} - state,time=0,0 + state=0 + freshSelectors() + time=0 score=0 rollSpeed=6.26 @@ -186,6 +196,7 @@ end local function touch(n) if state==0 then state=1 + freshSelectors() startTime=TIME() end local t=tostring(pos[1]) @@ -358,7 +369,7 @@ end scene.widgetList={ WIDGET.newButton{name="reset", x=155,y=100,w=180,h=100,color='lG',font=40,code=pressKey"r"}, modeSelector,bgmSelector,colorSelector, - WIDGET.newSwitch{name="arcade", x=230,y=430,font=40,disp=function()return arcade end,code=pressKey"e",hideF=function()return state~=0 end}, + arcadeSwitch, WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, }