From 7885bd80b5857d8a6c062897e014efa2eb78c162 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 17 Oct 2020 13:54:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E5=8F=AF=E9=A2=84=E8=A7=88=E5=9C=BA=E5=9C=B0=EF=BC=8C=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=BA=8F=E5=88=97/=E4=BB=BB=E5=8A=A1=E6=83=85?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/languages.lua | 44 ++++++++++++++++++++++++--------------- Zframework/widgetList.lua | 20 ++++++++++-------- parts/scenes.lua | 38 +++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 26 deletions(-) diff --git a/Zframework/languages.lua b/Zframework/languages.lua index abcdaf71..a112b3cf 100644 --- a/Zframework/languages.lua +++ b/Zframework/languages.lua @@ -177,6 +177,7 @@ local langList={ title="音乐室", arrow="→", now="正在播放:", + bgm="BGM", up="↑", play="播放", @@ -186,6 +187,8 @@ local langList={ customGame={ title="自定义游戏", subTitle="基本", + defSeq="默认序列", + noMsn="无任务", drop="下落延迟", lock="锁定延迟", @@ -195,8 +198,8 @@ local langList={ bg="背景", bgm="音乐", - copy="复制序列+场地+任务", - paste="粘贴序列+场地+任务", + copy="复制场地+序列+任务", + paste="粘贴场地+序列+任务", clear="开始-消除", puzzle="开始-拼图", @@ -764,6 +767,8 @@ local langList={ customGame={ title="自定义游戏", subTitle="基本", + defSeq="默认序列", + noMsn="无任务", drop="下落延迟", lock="锁定延迟", @@ -773,8 +778,8 @@ local langList={ bg="背景", bgm="音乐", - copy="复制序列+场地+任务", - paste="粘贴序列+场地+任务", + copy="复制场地+序列+任务", + paste="粘贴场地+序列+任务", clear="开始-消除", puzzle="开始-拼图", @@ -1343,6 +1348,8 @@ local langList={ customGame={ title="Custom Game", subTitle="Basic", + defSeq="Default Seq.", + noMsn="No mission", drop="Drop Delay", lock="Lock Delay", @@ -1352,15 +1359,15 @@ local langList={ bg="Background", bgm="Music", - copy="Copy Seq+Field+Misn", - paste="Paste Seq+Field+Misn", + copy="Copy Field+Seq+Misn", + paste="Paste Field+Seq+Misn", clear="Start-Clear", puzzle="Start-Puzzle", advance="More (A)", - field="EditField (F)", - sequence="EditSequence (S)", - mission="EditMission (M)", + field="Edit Field (F)", + sequence="Edit Sequence (S)", + mission="Edit Mission (M)", back="Back", }, @@ -1919,10 +1926,11 @@ local langList={ down="↓", back="X", }, - customGame={ title="!@#$%^&*", subTitle="!!", + defSeq="0-[123]", + noMsn="-x-", drop="↓", lock="↓_", @@ -1932,15 +1940,15 @@ local langList={ bg="{~}", bgm="(~)", - copy="Copy Seq+Field+Misn", - paste="Paste Seq+Field+Misn", + copy="Copy Field+Seq+Misn", + paste="Paste Field+Seq+Misn", clear="Start-Clear", puzzle="Start-Puzzle", advance="More (A)", - field="EditField (F)", - sequence="EditSequence (S)", - mission="EditMission (M)", + field="Edit Field (F)", + sequence="Edit Sequence (S)", + mission="Edit Mission (M)", back="X", }, @@ -2502,6 +2510,8 @@ local langList={ customGame={ title="自定义游戏", subTitle="基本", + defSeq="默认序列", + noMsn="无任务", drop="下落延迟", lock="锁定延迟", @@ -2511,8 +2521,8 @@ local langList={ bg="背景", bgm="音乐", - copy="复制序列+场地+任务", - paste="粘贴序列+场地+任务", + copy="复制场地+序列+任务", + paste="粘贴场地+序列+任务", clear="开始-消除", puzzle="开始-拼图", diff --git a/Zframework/widgetList.lua b/Zframework/widgetList.lua index 949eca85..1decc9d8 100644 --- a/Zframework/widgetList.lua +++ b/Zframework/widgetList.lua @@ -181,12 +181,14 @@ local Widgets={ customGame={ newText({name="title", x=600,y=5,font=80,align="R"}), newText({name="subTitle", x=610,y=50,font=35,align="L",color="grey"}), + newText({name="defSeq", x=450,y=550,color="grey",hide=function()return preBag[1]end}), + newText({name="noMsn", x=730,y=550,color="grey",hide=function()return preMission[1]end}), --Basic - newSelector({name="drop", x=160, y=150,w=220,color="orange", list=CUSlist.drop, disp=CUSval("drop"),code=CUSsto("drop")}), - newSelector({name="lock", x=160, y=230,w=220,color="red", list=CUSlist.lock, disp=CUSval("lock"),code=CUSsto("lock")}), - newSelector({name="wait", x=400, y=150,w=220,color="green", list=CUSlist.wait, disp=CUSval("wait"),code=CUSsto("wait")}), - newSelector({name="fall", x=400, y=230,w=220,color="yellow", list=CUSlist.fall, disp=CUSval("fall"),code=CUSsto("fall")}), + newSelector({name="drop", x=170, y=150,w=220,color="orange", list=CUSlist.drop, disp=CUSval("drop"),code=CUSsto("drop")}), + newSelector({name="lock", x=170, y=230,w=220,color="red", list=CUSlist.lock, disp=CUSval("lock"),code=CUSsto("lock")}), + newSelector({name="wait", x=410, y=150,w=220,color="green", list=CUSlist.wait, disp=CUSval("wait"),code=CUSsto("wait")}), + newSelector({name="fall", x=410, y=230,w=220,color="yellow", list=CUSlist.fall, disp=CUSval("fall"),code=CUSsto("fall")}), --Else newSelector({name="bg", x=1070, y=150,w=250,color="yellow", list=CUSlist.bg, disp=CUSval("bg"), code=function(i)customEnv.bg=i BG.set(i)end}), @@ -402,7 +404,7 @@ local Widgets={ newButton({name="back", x=1140, y=640, w=170,h=80, font=40,code=BACK}), }, setting_video={ - newText({name="title",x=640,y=15,font=80}), + newText({name="title", x=640,y=15,font=80}), newButton({name="sound", x=200, y=80,w=240,h=80,color="lCyan",font=35,code=swapScene("setting_sound","swipeR")}), newButton({name="game", x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=swapScene("setting_game","swipeL")}), @@ -487,10 +489,10 @@ local Widgets={ newButton({name="back", x=1140, y=640,w=170,h=80,font=40,code=BACK}), }, setting_key={ - newText({name="keyboard", x=340,y=30,color="lRed",font=25}), - newText({name="keyboard", x=940,y=30,color="lRed",font=25}), - newText({name="joystick", x=540,y=30,color="lBlue",font=25}), - newText({name="joystick", x=1140,y=30,color="lBlue",font=25}), + newText({name="keyboard", x=340,y=30,font=25,color="lRed"}), + newText({name="keyboard", x=940,y=30,font=25,color="lRed"}), + newText({name="joystick", x=540,y=30,font=25,color="lBlue"}), + newText({name="joystick", x=1140,y=30,font=25,color="lBlue"}), newText({name="help", x=50,y=650,font=30,align="L"}), newButton({name="back", x=1140,y=640,w=170,h=80,font=40,code=BACK}), }, diff --git a/parts/scenes.lua b/parts/scenes.lua index 773f3c3f..8c8c3582 100644 --- a/parts/scenes.lua +++ b/parts/scenes.lua @@ -1470,6 +1470,43 @@ do--customGame WIDGET.keyPressed(key) end end + + local preField=preField + function Pnt.customGame() + --Field + gc.push("transform") + gc.translate(95,290) + gc.scale(.5) + gc.setColor(1,1,1) + gc.setLineWidth(3) + gc.rectangle("line",-2,-2,304,604) + local cross=puzzleMark[-1] + for y=1,20 do for x=1,10 do + local B=preField[y][x] + if B>0 then + gc.draw(blockSkin[B],30*x-30,600-30*y) + elseif B==-1 then + gc.draw(cross,30*x-30,600-30*y) + end + end end + gc.pop() + + --Sequence + if #preBag>0 then + setFont(40) + gc.setColor(1,1,int(Timer()*3)%2) + gc.print("#",365,545) + gc.print(#preBag,390,545) + end + + --Sequence + if #preMission>0 then + setFont(40) + gc.setColor(1,1,int(Timer()*3)%2) + gc.print("#",645,545) + gc.print(#preMission,670,545) + end + end end do--custom_advance function sceneInit.custom_advance() @@ -1656,6 +1693,7 @@ do--custom_field a=12,s=13,d=14,f=15,g=16,h=17, z=0,x=-1, } + local preField=preField function mouseDown.custom_field(x,y,k) mouseMove.custom_field(x,y) end