登录界面可以选择记住密码
This commit is contained in:
@@ -602,6 +602,7 @@ return{
|
|||||||
register="Register",
|
register="Register",
|
||||||
email="E-mail Address",
|
email="E-mail Address",
|
||||||
password="Password",
|
password="Password",
|
||||||
|
keepPW="Remember me",
|
||||||
login="Log In",
|
login="Log In",
|
||||||
},
|
},
|
||||||
register={
|
register={
|
||||||
|
|||||||
@@ -509,6 +509,7 @@ return{
|
|||||||
register="Enregistrement",
|
register="Enregistrement",
|
||||||
email="E-mail",
|
email="E-mail",
|
||||||
password="Mot de passe",
|
password="Mot de passe",
|
||||||
|
-- keepPW="Remember me",
|
||||||
login="Connexion",
|
login="Connexion",
|
||||||
},
|
},
|
||||||
register={
|
register={
|
||||||
|
|||||||
@@ -599,6 +599,7 @@ return{
|
|||||||
register="Registrar",
|
register="Registrar",
|
||||||
email="Endereço De Email",
|
email="Endereço De Email",
|
||||||
password="Senha",
|
password="Senha",
|
||||||
|
-- keepPW="Remember me",
|
||||||
login="Log in",
|
login="Log in",
|
||||||
},
|
},
|
||||||
register={
|
register={
|
||||||
|
|||||||
@@ -513,6 +513,7 @@ return{
|
|||||||
register="Registrarse",
|
register="Registrarse",
|
||||||
email="Correo Elec.",
|
email="Correo Elec.",
|
||||||
password="Contraseña",
|
password="Contraseña",
|
||||||
|
-- keepPW="Remember me",
|
||||||
login="Entrar",
|
login="Entrar",
|
||||||
},
|
},
|
||||||
register={
|
register={
|
||||||
|
|||||||
@@ -443,6 +443,7 @@ return{
|
|||||||
register="Sign up",
|
register="Sign up",
|
||||||
email="@",
|
email="@",
|
||||||
password="*",
|
password="*",
|
||||||
|
-- keepPW="I",
|
||||||
login="Log in",
|
login="Log in",
|
||||||
},
|
},
|
||||||
register={
|
register={
|
||||||
|
|||||||
@@ -600,6 +600,7 @@ return{
|
|||||||
register="注册",
|
register="注册",
|
||||||
email="邮箱",
|
email="邮箱",
|
||||||
password="密码",
|
password="密码",
|
||||||
|
keepPW="保存密码",
|
||||||
login="登录",
|
login="登录",
|
||||||
},
|
},
|
||||||
register={
|
register={
|
||||||
|
|||||||
@@ -1,21 +1,42 @@
|
|||||||
|
local emailBox=WIDGET.newInputBox{name="email",x=380,y=200,w=500,h=60}
|
||||||
|
local passwordBox=WIDGET.newInputBox{name="password",x=380,y=300,w=620,h=60,secret=true,regex="[ -~]"}
|
||||||
|
|
||||||
|
local savePW=false
|
||||||
|
|
||||||
local function login()
|
local function login()
|
||||||
local email= WIDGET.active.email.value
|
local email,password=emailBox.value,passwordBox.value
|
||||||
local password= WIDGET.active.password.value
|
|
||||||
if not STRING.simpEmailCheck(email)then
|
if not STRING.simpEmailCheck(email)then
|
||||||
LOG.print(text.wrongEmail)return
|
LOG.print(text.wrongEmail)return
|
||||||
elseif #password==0 then
|
elseif #password==0 then
|
||||||
LOG.print(text.noPassword)return
|
LOG.print(text.noPassword)return
|
||||||
end
|
end
|
||||||
NET.wsconn_user_pswd(email,password)
|
NET.wsconn_user_pswd(email,password)
|
||||||
|
if savePW then
|
||||||
|
FILE.save({email,password},"conf/account",'q')
|
||||||
|
else
|
||||||
|
if love.filesystem.getInfo("conf/account")then
|
||||||
|
love.filesystem.remove("conf/account")
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local scene={}
|
local scene={}
|
||||||
|
|
||||||
|
function scene.sceneInit()
|
||||||
|
local data=FILE.load("conf/account")
|
||||||
|
if data then
|
||||||
|
savePW=true
|
||||||
|
emailBox.value=data[1]
|
||||||
|
passwordBox.value=data[2]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
scene.widgetList={
|
scene.widgetList={
|
||||||
WIDGET.newText{name="title", x=80, y=50,font=70,align='L'},
|
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},
|
WIDGET.newButton{name="register", x=1140, y=100,w=170,h=80,color='lY',code=function()SCN.swapTo('register','swipeR')end},
|
||||||
WIDGET.newInputBox{name="email", x=380, y=200,w=500,h=60},
|
emailBox,
|
||||||
WIDGET.newInputBox{name="password", x=380, y=300,w=626,h=60,secret=true,regex="[ -~]"},
|
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.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,font=40,code=backScene},
|
WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,8 +32,9 @@ return STRING.split([=[
|
|||||||
新增垃圾行缓冲条总数警告
|
新增垃圾行缓冲条总数警告
|
||||||
添加模式环境变量bufferLimit,攻击缓冲上限可以调整
|
添加模式环境变量bufferLimit,攻击缓冲上限可以调整
|
||||||
添加模式环境变量maxOver,允许超屏最大高度可以调整
|
添加模式环境变量maxOver,允许超屏最大高度可以调整
|
||||||
添加两个虚拟按键预设槽位
|
|
||||||
玩家个人信息栏下部显示在线玩家数量
|
玩家个人信息栏下部显示在线玩家数量
|
||||||
|
登陆界面可以选择记住密码
|
||||||
|
添加两个虚拟按键预设槽位
|
||||||
改动:
|
改动:
|
||||||
词典新增两个游戏词条
|
词典新增两个游戏词条
|
||||||
更换细一点的字体
|
更换细一点的字体
|
||||||
|
|||||||
Reference in New Issue
Block a user