diff --git a/Zframework/languages.lua b/Zframework/languages.lua index e31e4167..8bb93639 100644 --- a/Zframework/languages.lua +++ b/Zframework/languages.lua @@ -378,7 +378,9 @@ local langList={ p15={ reset="打乱", color="颜色", - hide="盲", + blind="盲打", + slide="滑动操作", + revKB="键盘反向", back="返回", }, help={ @@ -859,7 +861,9 @@ local langList={ p15={ reset="打乱", color="颜色", - hide="盲", + blind="盲打", + slide="滑动操作", + revKB="键盘反向", back="返回", }, help={ @@ -1330,7 +1334,9 @@ local langList={ p15={ reset="Shuffle", color="Color", - hide="Blind", + blind="Blind", + slide="Slide", + revKB="Reverse", back="Back", }, help={ @@ -1799,7 +1805,9 @@ local langList={ p15={ reset="!@#$%", color="~~~", - hide="???", + blind="???", + slide="~_~", + revKB="Reverse", back="X", }, help={ @@ -2282,7 +2290,9 @@ local langList={ p15={ reset="打乱", color="彩", - hide="瞎", + blind="盲", + slide="滑动", + revKB="键盘反向", back="返回", }, help={ diff --git a/Zframework/widgetList.lua b/Zframework/widgetList.lua index c86ab2d5..b1551bc4 100644 --- a/Zframework/widgetList.lua +++ b/Zframework/widgetList.lua @@ -468,8 +468,10 @@ local Widgets={ }, p15={ newButton({name="reset", x=160,y=100,w=180,h=100,color="lGreen", font=40,code=pressKey("space")}), - newSlider({name="color", x=110,y=240,w=170,unit=4,show=false, font=30,disp=function()return sceneTemp.color end,code=function(v)sceneTemp.color=v end,hide=function()return sceneTemp.state<2 end}), - newSwitch({name="hide", x=200,y=340,w=60, font=40,disp=function()return sceneTemp.blind end,code=pressKey("h"),hide=function()return sceneTemp.state>0 end}), + newSlider({name="color", x=110,y=250,w=170,unit=4,show=false, font=30,disp=function()return sceneTemp.color end,code=function(v)sceneTemp.color=v end,hide=function()return sceneTemp.state<2 end}), + newSwitch({name="blind", x=200,y=350,w=60, font=40,disp=function()return sceneTemp.blind end,code=pressKey("b"),hide=function()return sceneTemp.state>0 end}), + newSwitch({name="slide", x=200,y=450,w=60, font=40,disp=function()return sceneTemp.slide end,code=pressKey("s"),hide=function()return sceneTemp.state>0 end}), + newSwitch({name="revKB", x=200,y=550,w=60, font=40,disp=function()return sceneTemp.revKB end,code=pressKey("r"),hide=function()return sceneTemp.state>0 end}), newButton({name="back", x=1140,y=640,w=180,h=80,color="white", font=35,code=BACK}), }, help={ diff --git a/parts/scenes.lua b/parts/scenes.lua index 642cb69b..2500398c 100644 --- a/parts/scenes.lua +++ b/parts/scenes.lua @@ -141,6 +141,12 @@ do--calculator if S.pass then setFont(30)mStr(S.tip,640,10)end end end +do--minigame + function sceneInit.p15() + BG.set("space") + BGM.play() + end +end do--p15 function sceneInit.p15() BG.set("rainbow") @@ -155,6 +161,8 @@ do--p15 color=2, blind=false, + slide=true, + revKB=false, } end @@ -253,13 +261,13 @@ do--p15 local S=sceneTemp local b=S.board if k=="up"then - tapBoard(S.x,S.y+1,true) + tapBoard(S.x,S.y-(S.revKB and 1 or -1),true) elseif k=="down"then - tapBoard(S.x,S.y-1,true) + tapBoard(S.x,S.y+(S.revKB and 1 or -1),true) elseif k=="left"then - tapBoard(S.x+1,S.y,true) + tapBoard(S.x-(S.revKB and 1 or -1),S.y,true) elseif k=="right"then - tapBoard(S.x-1,S.y,true) + tapBoard(S.x+(S.revKB and 1 or -1),S.y,true) elseif k=="space"then shuffleBoard(S,b) S.state=0 @@ -269,7 +277,15 @@ do--p15 if S.state==2 then S.color=(S.color+1)%5 end - elseif k=="h"then + elseif k=="r"then + if S.state==0 then + S.revKB=not S.revKB + end + elseif k=="s"then + if S.state==0 then + S.slide=not S.slide + end + elseif k=="b"then if S.state==0 then S.blind=not S.blind end @@ -281,13 +297,17 @@ do--p15 tapBoard(x,y) end function mouseMove.p15(x,y) - tapBoard(x,y) + if sceneTemp.slide then + tapBoard(x,y) + end end function touchDown.p15(id,x,y) tapBoard(x,y) end function touchMove.p15(id,x,y,dx,dy) - tapBoard(x,y) + if sceneTemp.slide then + tapBoard(x,y) + end end function Tmr.p15() @@ -337,10 +357,10 @@ do--p15 color.black,color.black,color.black,color.black, },--Black { - color.grey,color.grey,color.grey,color.grey, - color.grey,color.grey,color.grey,color.grey, - color.grey,color.grey,color.grey,color.grey, - color.grey,color.grey,color.grey,color.grey, + color.dGrey,color.dGrey,color.dGrey,color.dGrey, + color.dGrey,color.dGrey,color.dGrey,color.dGrey, + color.dGrey,color.dGrey,color.dGrey,color.dGrey, + color.dGrey,color.dGrey,color.dGrey,color.dGrey, },--Grey { color.dRed,color.dRed,color.dRed,color.dRed, @@ -385,7 +405,7 @@ do--p15 local blind=S.blind and S.state==1 local N=S.board[i][j] - local C=blind and 0 or S.color + local C=blind and 1 or S.color local backColor=backColor[C] local frontColor=frontColor[C]