From 2cf64541f2b907be3d75efc7e41d1fb2bc054e96 Mon Sep 17 00:00:00 2001 From: MrZ_26 Date: Sun, 16 Aug 2020 21:01:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=8A=A0=E8=BD=BD=E9=83=A8?= =?UTF-8?q?=E5=88=86=E8=80=81=E7=89=88=E6=9C=AC=E5=AD=98=E6=A1=A3=EF=BC=8C?= =?UTF-8?q?=E8=BD=AF=E4=BB=B6=E9=94=81=E7=95=8C=E9=9D=A2=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E6=97=B6=E6=9C=BA=E8=B0=83=E6=95=B4=EF=BC=8C=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/init.lua | 10 ++++++++-- Zframework/paint.lua | 14 ++++++++------ Zframework/timer.lua | 13 +++++-------- Zframework/widgetList.lua | 34 +++++++++++++++++----------------- main.lua | 11 ++++++++--- 5 files changed, 46 insertions(+), 36 deletions(-) diff --git a/Zframework/init.lua b/Zframework/init.lua index 870ba801..5e513aed 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -173,10 +173,12 @@ function keyDown.calculator(k) if S.val==626 then S.pass=true elseif S.val==196022 then + S.pass=true marking=nil TEXT.show("\68\69\86\58\87\97\116\101\114\109\97\114\107\32\82\101\109\111\118\101\100",640,360,60,"stretch",.6) SFX.play("clear") elseif S.val==72943816 then + S.pass=true for name,M in next,Modes do if not modeRanks[name]then modeRanks[name]=M.score and 0 or 6 @@ -191,7 +193,7 @@ function keyDown.calculator(k) end elseif k=="space"then if S.pass then - SCN.swapTo("load") + SCN.swapTo("intro") end end end @@ -217,6 +219,10 @@ function mouseDown.intro(x,y,k) if k==2 then VOC.play("bye") SCN.back() + elseif newVersionLaunch then + SCN.push("main","fade") + SCN.swapTo("history","fade") + TEXT.show(text.newVersion,640,200,30,"fly",.3) else SCN.go("main") end @@ -1094,7 +1100,7 @@ function love.run() local FCT=0--Framedraw counter love.resize(gc.getWidth(),gc.getHeight()) - SCN.init(setting.appLock and "calculator"or"load")--Scene Launch + SCN.init("load")--Scene Launch marking=true return function() diff --git a/Zframework/paint.lua b/Zframework/paint.lua index 9f44eb3a..62c541e1 100644 --- a/Zframework/paint.lua +++ b/Zframework/paint.lua @@ -111,13 +111,15 @@ function Pnt.load() gc.rectangle("fill",300,330,S.cur/S.tar*680,60,5) gc.setColor(1,1,1) gc.rectangle("line",300,330,680,60,5) - setFont(35) - gc.print(text.load[S.phase],340,335) - if S.phase~=0 then - gc.printf(S.cur.."/"..S.tar,795,335,150,"right") + if not setting.appLock then + setFont(35) + gc.print(text.load[S.phase],340,335) + if S.phase~=0 then + gc.printf(S.cur.."/"..S.tar,795,335,150,"right") + end + setFont(25) + mStr(S.tip,640,400) end - setFont(25) - mStr(S.tip,640,400) end local titleTransform={ diff --git a/Zframework/timer.lua b/Zframework/timer.lua index 5cbc9084..39e40441 100644 --- a/Zframework/timer.lua +++ b/Zframework/timer.lua @@ -39,18 +39,15 @@ function Tmr.load() SKIN.load() stat.run=stat.run+1 -------------------------- - SFX.play("welcome_sfx") - VOC.play("welcome") + if not setting.appLock then + SFX.play("welcome_sfx") + VOC.play("welcome") + end else S.cur=S.cur+1 S.tar=S.cur if S.cur>62.6 then - if newVersionLaunch then - SCN.push("intro","fade") - SCN.swapTo("history","fade") - else - SCN.swapTo("intro","none") - end + SCN.swapTo(setting.appLock and "calculator"or"intro","none") end loadingFinished=true return diff --git a/Zframework/widgetList.lua b/Zframework/widgetList.lua index f0a3bac1..6f10f359 100644 --- a/Zframework/widgetList.lua +++ b/Zframework/widgetList.lua @@ -99,23 +99,23 @@ newSlider=WIDGET.newSlider local Widgets={ load={},intro={},quit={}, calculator={ - newKey({name="_1", x=300,y=300,w=90,h=90, color="white", font=50,code=pressKey("1")}), - newKey({name="_2", x=400,y=300,w=90,h=90, color="white", font=50,code=pressKey("2")}), - newKey({name="_3", x=500,y=300,w=90,h=90, color="white", font=50,code=pressKey("3")}), - newKey({name="_4", x=300,y=400,w=90,h=90, color="white", font=50,code=pressKey("4")}), - newKey({name="_5", x=400,y=400,w=90,h=90, color="white", font=50,code=pressKey("5")}), - newKey({name="_6", x=500,y=400,w=90,h=90, color="white", font=50,code=pressKey("6")}), - newKey({name="_7", x=300,y=500,w=90,h=90, color="white", font=50,code=pressKey("7")}), - newKey({name="_8", x=400,y=500,w=90,h=90, color="white", font=50,code=pressKey("8")}), - newKey({name="_9", x=500,y=500,w=90,h=90, color="white", font=50,code=pressKey("9")}), - newKey({name="_0", x=300,y=600,w=90,h=90, color="white", font=50,code=pressKey("0")}), - newKey({name="<", x=400,y=600,w=90,h=90, color="lRed", font=50,code=pressKey("backspace")}), - newKey({name="=", x=500,y=600,w=90,h=90, color="lYellow",font=50,code=pressKey("return")}), - newKey({name="+", x=600,y=300,w=90,h=90, color="lBlue", font=50,code=pressKey("+")}), - newKey({name="-", x=600,y=400,w=90,h=90, color="lBlue", font=50,code=pressKey("-")}), - newKey({name="*", x=600,y=500,w=90,h=90, color="lBlue", font=50,code=pressKey("*")}), - newKey({name="/", x=600,y=600,w=90,h=90, color="lBlue", font=50,code=pressKey("/")}), - newButton({name="play", x=800,y=600,w=180,h=90, color="lGreen", font=40,code=pressKey("space"),hide=function()return not sceneTemp.pass end}), + newKey({name="_1", x=150,y=300,w=90,h=90, color="white", font=50,code=pressKey("1")}), + newKey({name="_2", x=250,y=300,w=90,h=90, color="white", font=50,code=pressKey("2")}), + newKey({name="_3", x=350,y=300,w=90,h=90, color="white", font=50,code=pressKey("3")}), + newKey({name="_4", x=150,y=400,w=90,h=90, color="white", font=50,code=pressKey("4")}), + newKey({name="_5", x=250,y=400,w=90,h=90, color="white", font=50,code=pressKey("5")}), + newKey({name="_6", x=350,y=400,w=90,h=90, color="white", font=50,code=pressKey("6")}), + newKey({name="_7", x=150,y=500,w=90,h=90, color="white", font=50,code=pressKey("7")}), + newKey({name="_8", x=250,y=500,w=90,h=90, color="white", font=50,code=pressKey("8")}), + newKey({name="_9", x=350,y=500,w=90,h=90, color="white", font=50,code=pressKey("9")}), + newKey({name="_0", x=150,y=600,w=90,h=90, color="white", font=50,code=pressKey("0")}), + newKey({name="<", x=250,y=600,w=90,h=90, color="lRed", font=50,code=pressKey("backspace")}), + newKey({name="=", x=350,y=600,w=90,h=90, color="lYellow",font=50,code=pressKey("return")}), + newKey({name="+", x=450,y=300,w=90,h=90, color="lBlue", font=50,code=pressKey("+")}), + newKey({name="-", x=450,y=400,w=90,h=90, color="lBlue", font=50,code=pressKey("-")}), + newKey({name="*", x=450,y=500,w=90,h=90, color="lBlue", font=50,code=pressKey("*")}), + newKey({name="/", x=450,y=600,w=90,h=90, color="lBlue", font=50,code=pressKey("/")}), + newButton({name="play", x=640,y=600,w=180,h=90, color="lGreen", font=40,code=pressKey("space"),hide=function()return not sceneTemp.pass end}), }, main={ newButton({name="play", x=150,y=280,w=200,h=160,color="lRed", font=55,code=function()SCN.go("mode")end}), diff --git a/main.lua b/main.lua index ab664ad0..41cfa7ad 100644 --- a/main.lua +++ b/main.lua @@ -99,6 +99,9 @@ else setting.swap=false setting.vib=2 setting.powerInfo=true + setting.fullscreen=true + love.window.setFullscreen(true) + love.resize(love.graphics.getWidth(),love.graphics.getHeight()) end end LANG.set(setting.lang) @@ -116,8 +119,11 @@ if fs.getInfo("tech_ultimate+.dat")then fs.remove("tech_ultimate+.dat")end R=modeRanks for k,v in next,R do if type(k)=="number"then - R[Modes[k].name],R[k]=R[k] - break + local save=v + if not R[Modes[k].name]then + R[Modes[k].name]=v + end + R[k]=nil end end if R.master_adavnce then @@ -134,7 +140,6 @@ if type(setting.spawn)~="number"then end if S.version~=gameVersion then S.version=gameVersion - TEXT.show(text.newVersion,640,200,30,"fly",.3) newVersionLaunch=true fs.remove("sprintPenta.dat")