控件代码分分布到场景代码中,优化控件相关代码

This commit is contained in:
MrZ626
2020-11-02 11:08:04 +08:00
parent e720387c61
commit 95fce6ca01
39 changed files with 917 additions and 902 deletions

View File

@@ -169,4 +169,13 @@ function Pnt.schulte_G()
end
end
end
end
end
WIDGET.init("schulte_G",{
WIDGET.newButton({name="reset", x=160,y=100,w=180,h=100,color="lGreen",font=40,code=WIDGET.lnk.pressKey("space"),hide=function()return sceneTemp.state==0 end}),
WIDGET.newSlider({name="rank", x=130,y=250,w=150,unit=3,show=false,font=40,disp=function()return sceneTemp.rank-3 end,code=function(v)sceneTemp.rank=v+3 end,hide=function()return sceneTemp.state>0 end}),
WIDGET.newSwitch({name="blind", x=240,y=330,w=60, font=40,disp=WIDGET.lnk.STPval("blind"), code=WIDGET.lnk.pressKey("q"),hide=WIDGET.lnk.STPeq("state",1)}),
WIDGET.newSwitch({name="disappear", x=240,y=420,w=60, font=40,disp=WIDGET.lnk.STPval("disappear"),code=WIDGET.lnk.pressKey("w"),hide=WIDGET.lnk.STPeq("state",1)}),
WIDGET.newSwitch({name="tapFX", x=240,y=510,w=60, font=40,disp=WIDGET.lnk.STPval("tapFX"), code=WIDGET.lnk.pressKey("e"),hide=WIDGET.lnk.STPeq("state",1)}),
WIDGET.newButton({name="back", x=1140,y=640,w=170,h=80, font=40,code=WIDGET.lnk.BACK}),
})