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

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

@@ -72,4 +72,25 @@ function Pnt.setting_control()
gc.draw(_,x,580,nil,40/30)
gc.draw(_,x+40,540,nil,40/30)
gc.draw(_,x+40,580,nil,40/30)
end
end
WIDGET.init("setting_control",{
WIDGET.newText({name="title", x=80, y=50,font=70,align="L"}),
WIDGET.newText({name="preview", x=520, y=540,font=40,align="R"}),
WIDGET.newSlider({name="das", x=250, y=200,w=910,unit=26,disp=WIDGET.lnk.SETval("das"), show="frame_time",code=WIDGET.lnk.SETsto("das")}),
WIDGET.newSlider({name="arr", x=250, y=290,w=525,unit=15,disp=WIDGET.lnk.SETval("arr"), show="frame_time",code=WIDGET.lnk.SETsto("arr")}),
WIDGET.newSlider({name="sddas", x=250, y=380,w=350,unit=10,disp=WIDGET.lnk.SETval("sddas"), show="frame_time",code=WIDGET.lnk.SETsto("sddas")}),
WIDGET.newSlider({name="sdarr", x=250, y=470,w=140,unit=4, disp=WIDGET.lnk.SETval("sdarr"), show="frame_time",code=WIDGET.lnk.SETsto("sdarr")}),
WIDGET.newSwitch({name="ihs", x=1100, y=290, disp=WIDGET.lnk.SETval("ihs"), code=WIDGET.lnk.SETrev("ihs")}),
WIDGET.newSwitch({name="irs", x=1100, y=380, disp=WIDGET.lnk.SETval("irs"), code=WIDGET.lnk.SETrev("irs")}),
WIDGET.newSwitch({name="ims", x=1100, y=470, disp=WIDGET.lnk.SETval("ims"), code=WIDGET.lnk.SETrev("ims")}),
WIDGET.newButton({name="reset", x=160, y=580,w=200,h=100,color="lRed",font=40,
code=function()
local _=SETTING
_.das,_.arr=10,2
_.sddas,_.sdarr=0,2
_.ihs,_.irs,_.ims=false,false,false
end}),
WIDGET.newButton({name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk.BACK}),
})