15p可关闭滑动轨迹显示

This commit is contained in:
MrZ626
2020-09-06 21:22:43 +08:00
parent e5478739bb
commit e47e0e1c78
3 changed files with 20 additions and 5 deletions

View File

@@ -380,6 +380,7 @@ local langList={
color="颜色", color="颜色",
blind="盲打", blind="盲打",
slide="滑动操作", slide="滑动操作",
pathVis="路径显示",
revKB="键盘反向", revKB="键盘反向",
back="返回", back="返回",
}, },
@@ -863,6 +864,7 @@ local langList={
color="颜色", color="颜色",
blind="盲打", blind="盲打",
slide="滑动操作", slide="滑动操作",
pathVis="路径显示",
revKB="键盘反向", revKB="键盘反向",
back="返回", back="返回",
}, },
@@ -1336,6 +1338,7 @@ local langList={
color="Color", color="Color",
blind="Blind", blind="Blind",
slide="Slide", slide="Slide",
pathVis="Path show",
revKB="Reverse", revKB="Reverse",
back="Back", back="Back",
}, },
@@ -1807,6 +1810,7 @@ local langList={
color="~~~", color="~~~",
blind="???", blind="???",
slide="~_~", slide="~_~",
pathVis="--==>",
revKB="Reverse", revKB="Reverse",
back="X", back="X",
}, },
@@ -2292,6 +2296,7 @@ local langList={
color="", color="",
blind="", blind="",
slide="滑动", slide="滑动",
pathVis="路径显示",
revKB="键盘反向", revKB="键盘反向",
back="返回", back="返回",
}, },

View File

@@ -469,9 +469,10 @@ local Widgets={
p15={ p15={
newButton({name="reset", x=160,y=100,w=180,h=100,color="lGreen", font=40,code=pressKey("space")}), newButton({name="reset", x=160,y=100,w=180,h=100,color="lGreen", font=40,code=pressKey("space")}),
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}), 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="blind", x=200,y=330,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="slide", x=200,y=420,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}), newSwitch({name="pathVis", x=200,y=510,w=60, font=40,disp=function()return sceneTemp.pathVis end,code=pressKey("p"),hide=function()return sceneTemp.state>0 and sceneTemp.slide end}),
newSwitch({name="revKB", x=200,y=600,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}), newButton({name="back", x=1140,y=640,w=180,h=80,color="white", font=35,code=BACK}),
}, },
help={ help={

View File

@@ -143,7 +143,7 @@ do--calculator
end end
end end
do--minigame do--minigame
function sceneInit.p15() function sceneInit.minigame()
BG.set("space") BG.set("space")
BGM.play() BGM.play()
end end
@@ -163,6 +163,7 @@ do--p15
color=2, color=2,
blind=false, blind=false,
slide=true, slide=true,
pathVis=true,
revKB=false, revKB=false,
} }
end end
@@ -213,7 +214,9 @@ do--p15
local S=sceneTemp local S=sceneTemp
if S.state<2 then if S.state<2 then
if not key then if not key then
sysFX.newRipple(.16,x,y,10) if S.pathVis then
sysFX.newRipple(.16,x,y,10)
end
x,y=int((x-320)/160)+1,int((y-40)/160)+1 x,y=int((x-320)/160)+1,int((y-40)/160)+1
end end
local b=S.board local b=S.board
@@ -295,6 +298,12 @@ do--p15
if S.state==0 then if S.state==0 then
S.slide=not S.slide S.slide=not S.slide
end end
elseif k=="p"then
if S.state==0 then
if S.slide then
S.pathVis=not S.pathVis
end
end
elseif k=="b"then elseif k=="b"then
if S.state==0 then if S.state==0 then
S.blind=not S.blind S.blind=not S.blind