title.y = SY + ( connexion.mailField.y - connexion.mailField.height/2 )/2
connexion:insert( title )
+ connexion.title = title
end
mailField.y=SY + 160
mailField.inputType = "email"
mailField.placeholder = "Adresse mail"
- mailField.size = inputFontSize
+ mailField.size = inputFontSize + 6
mailField.align = "center"
mailField.alpha = .9
mdpField.y = mailField.y + mailField.height + 10
mdpField.isSecure = true
mdpField.placeholder = "Mot de passe"
- mdpField.size = inputFontSize
+ mdpField.size = inputFontSize + 6
mdpField.align = "center"
mdpField.alpha = .9
local function onRetour( event )
+ connexion.title.text = "Connexion"
connexion.recup.x = CX
connexion.valider.x = CX
connexion.retour:removeSelf()
local retour = widget.newButton
{
- width = VW,
- height = .12*VH,
- label = "Retour",
- fontSize = 24,
+ width = 5/8 * VW,
+ height = 1/11 * VH,
+ label = "Retour vers Connexion",
defaultFile = "blue_texture.png",
labelColor = { default = {1,1,1}, over = {0,0,0,.5} },
onPress = onRetour,
- font = "Dosis-Book"
}
retour.x = CX
- retour.y = VH - retour.height*3/2
+ retour.y = VH - retour.height*3/2 - 40
connexion:insert( retour )
connexion.retour = retour
local function onChangePwd(event)
+ connexion.title.text = "Récupération"
connexion.mdpField.isVisible = false
transition.to( connexion.mailField, { time = 400, y = connexion.mdpField.y, transition = easing.outBounce } )
local indication = display.newText( "Indiquez votre adresse E-mail", CX, connexion.mailField.y, "Dosis-Book", 20 )
-- création du bouton valider le changement de mot de passe
local changer = widget.newButton
{
- width = 200,
- height = 50,
- fillColor = { default = { 0, 0, 0, .01 } },
+ shape = "rect",
+ width = 250,
+ height = 30,
+ fillColor = { default = { 0, 0, 0, .5 }, over = { 0, 0, 0, .4 } },
label = "Obtenir un nouveau mot de passe",
onPress = onSwitchPwd,
font = "Dosis-Book"
local recup = widget.newButton
{
+ shape = "rect",
width = 200,
- height = 50,
- fillColor = { default = { 0, 0, 0, .01 } },
+ height = 30,
+ fillColor = { default = { 0, 0, 0, .5 }, over = { 0, 0, 0, .4 } },
label = "Récuperer mot de passe",
- onPress = onChangePwd,
+ onRelease = onChangePwd,
font = "Dosis-Book"
}
recup.x = CX
- recup.y = connexion.mdpField.y + connexion.mdpField.height + 10
+ recup.y = connexion.mdpField.y + connexion.mdpField.height + 20
connexion:insert( recup )
connexion.recup = recup