Quick-3.5
Local Editaccount,editpwd
Local function Editboxeventhandler (streventname,psender)
Local edit = Psender:getname ()
if streventname = = "return" Then
if edit = = "Editaccount" Then
Local _delay = function ()
If not Tolua.isnull (EDITPWD) Then
Editpwd:touchdownaction (Editpwd, touch_event_ended)
End
End
Scheduler.performwithdelayglobal (_delay, 0)
End
End
End
Editaccount = Cc.ui.UIInput.newEditBox_ ({
Size = cc.size (340, 60),
Image = "Space.png"
})
Editaccount:setanchorpoint (CC.P (0,0.3))
Editaccount:setname ("Editaccount")
Editaccount:setplaceholder ("4-20-letter or number")
Editaccount:setplaceholderfont ("Fonts/fzzy.ttf", 24)
Editaccount:setmaxlength (40)
Editaccount:setinputmode (CC. EDITBOX_INPUT_MODE_EMAILADDR)
Editaccount:setreturntype (CC. Keyboard_returntype_default)
Editaccount:registerscripteditboxhandler (Editboxeventhandler)
Self.textFileAccount:addChild (Editaccount, 2)
Editpwd = Cc.ui.UIInput.newEditBox_ ({
Size = cc.size (340, 60),
Image = "Space.png"
})
Editpwd:setanchorpoint (CC.P (0,0.3))
Editpwd:setplaceholder ("6-20-letter or number")
Editpwd:setplaceholderfont ("Fonts/fzzy.ttf", 24)
Editpwd:setmaxlength (20)
Editpwd:setinputmode (CC. Editbox_input_mode_singleline)
Editpwd:setinputflag (CC. Editbox_input_flag_password)
Editpwd:setreturntype (CC. Keyboard_returntype_default)
Self.textFieldPassword:addChild (EDITPWD, 2)
Uieditbox control Use Click the input box to automatically switch to the next input box and move up the background