Setting Up An Information Screen

So although I have never used the director class, I’m aware of it as an option. But in my case I chose not to have any screen changes occur because I need the main screen to retain the information the user inputed. What I’m trying to do instead is have a backdrop lay across the surface of my main screen and give the impressions of a new screen. Doing it this way, I’ve noticed two problems.

First of all, it takes almost 3 seconds for my backdrop to appear on the screen. I do have a lot of lines of coding but I placed the event listener and the function literally on top of one another on the very last few lines of my project. When I noticed the 3 second delay, I moved the function event to the top of my coding but the 3 second time gap still remained and so I moved the function back to the bottom of my coding. The strange thing is that immediately above this function is another event listener and function but it doesn’t have any noticeable delay.

Secondly, once the backdrop successfully appears over the main screen, all of the native.newTextFields present in the main screen are not covered by the backdrop. 

Any ideas on how to fix these problems? Or is there an easier way altogether that you know of?

Here is my last lines of code referring to the function and eventlistener:

[lua]local function infoButtonFunction (e)

    

    if (e.phase == “began”) then

        local infoBackdrop = display.newImageRect (“infoBackdrop.png”, display.contentWidth*2, display.contentHeight*2)

        

    end

end

infoButton:addEventListener (“touch”, infoButtonFunction)[/lua]

For the 2nd problem, all native UI elements (like the text fields) are always going to be on “top”. There’s no way to layer them like regular display objects. 1 trick is to move the position of them (so that they’re off screen). That way they’re not on top of everything, and then when you go back to the main screen, you just revert to the original positions.

or, if you want to remove it completely and just re-initialize later use object:removeSelf()

For the 2nd problem, all native UI elements (like the text fields) are always going to be on “top”. There’s no way to layer them like regular display objects. 1 trick is to move the position of them (so that they’re off screen). That way they’re not on top of everything, and then when you go back to the main screen, you just revert to the original positions.

or, if you want to remove it completely and just re-initialize later use object:removeSelf()