代码规范:把所有的tab换成空格

This commit is contained in:
MrZ626
2021-08-25 04:28:52 +08:00
parent 8f910f95f4
commit 295e79984f
271 changed files with 35384 additions and 35379 deletions

View File

@@ -4,39 +4,39 @@ local passwordBox=WIDGET.newInputBox{name="password",x=380,y=300,w=620,h=60,secr
local savePW=false
local function _login()
local email,password=emailBox:getText(),passwordBox:getText()
if not STRING.simpEmailCheck(email)then
MES.new('error',text.wrongEmail)return
elseif #password==0 then
MES.new('error',text.noPassword)return
end
NET.wsconn_user_pswd(email,password)
if savePW then
FILE.save({email,password},'conf/account')
else
love.filesystem.remove('conf/account')
end
local email,password=emailBox:getText(),passwordBox:getText()
if not STRING.simpEmailCheck(email)then
MES.new('error',text.wrongEmail)return
elseif #password==0 then
MES.new('error',text.noPassword)return
end
NET.wsconn_user_pswd(email,password)
if savePW then
FILE.save({email,password},'conf/account')
else
love.filesystem.remove('conf/account')
end
end
local scene={}
function scene.sceneInit()
local data=FILE.load('conf/account')
if data then
savePW=true
emailBox:setText(data[1])
passwordBox:setText(data[2])
end
local data=FILE.load('conf/account')
if data then
savePW=true
emailBox:setText(data[1])
passwordBox:setText(data[2])
end
end
scene.widgetList={
WIDGET.newText{name="title", x=80, y=50,font=70,align='L'},
WIDGET.newButton{name="register", x=1140, y=100,w=170,h=80,color='lY',code=function()SCN.swapTo('register','swipeR')end},
emailBox,
passwordBox,
WIDGET.newSwitch{name="keepPW", x=900,y=420,disp=function()return savePW end,code=function()savePW=not savePW end},
WIDGET.newKey{name="login", x=1140, y=540,w=170,h=80,font=40,code=_login},
WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,fText=TEXTURE.back,code=backScene},
WIDGET.newText{name="title", x=80, y=50,font=70,align='L'},
WIDGET.newButton{name="register",x=1140,y=100,w=170,h=80,color='lY',code=function()SCN.swapTo('register','swipeR')end},
emailBox,
passwordBox,
WIDGET.newSwitch{name="keepPW", x=900, y=420,disp=function()return savePW end,code=function()savePW=not savePW end},
WIDGET.newKey{name="login", x=1140,y=540,w=170,h=80,font=40,code=_login},
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene},
}
return scene