Hey guys. I’m almost done with our login screen. I’m to the point where I move from one scene (the login) to the menu. The last problem I have is that the text fields are the last thing that get removed, and they “pop” out, instead of fading out with the rest of the scene. Here’s what I’ve got:
-- "scene:destroy()" function scene:destroy( event ) if (userField) then userField:removeSelf() userfield = nil end if (passwordField) then passwordField:removeSelf() passwordField = nil end local sceneGroup = self.view -- Called prior to the removal of scene's view ("sceneGroup"). -- Insert code here to clean up the scene. -- Example: remove display objects, save state, etc. end
function settings:logIn(userName,password) -- print( "clicking on log in" ) local userName = userName local password = password --== User 1 DOES exists print( "--== Log in user 1 ==--") coronium:loginUser( userName, password, function(e) if not e.error then composer.removeScene("current") composer.gotoScene("src.menu\_scene","fade",1000) else print( "--== User :does not exist ==--" ) end end) end