整理代码,调整local函数名规范(较边缘的代码不必遵守,比如外部的库和小程序):

特别临时性的用全大写字母缩写或者单字母
TASK模块用到的任务函数和检查函数开头分别为task_和check_
其他函数开头添加下划线作为指示
This commit is contained in:
MrZ626
2021-08-25 02:40:01 +08:00
parent ee55055385
commit 8f910f95f4
40 changed files with 470 additions and 466 deletions

View File

@@ -1,6 +1,6 @@
local scene={}
local function register()
local function _register()
local username= WIDGET.active.username:getText()
local email= WIDGET.active.email:getText()
local password= WIDGET.active.password:getText()
@@ -25,7 +25,7 @@ scene.widgetList={
WIDGET.newInputBox{name="password", x=380, y=400,w=626,h=60,secret=true,regex="[ -~]"},
WIDGET.newInputBox{name="password2",x=380, y=500,w=626,h=60,secret=true,regex="[ -~]"},
WIDGET.newKey{name="register", x=640, y=640,w=300,h=80,font=40,code=register,hideF=function()return NET.getlock('register')end},
WIDGET.newKey{name="register", x=640, y=640,w=300,h=80,font=40,code=_register,hideF=function()return NET.getlock('register')end},
WIDGET.newText{name="registering", x=640, y=605,font=50,hideF=function()return not NET.getlock('register')end},
WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,fText=TEXTURE.back,code=backScene},