I’m struggling trying to get a hideOverlay() / parent:resume() to cooperate with “re-showing” my button. I bring in a Help page overlay and make the background opaque so the parent page objects show through. I have tried two methods to hide/show an unwanted button on the parent scene. Both worked to hide the button, but coming back it stays hidden.
The example from the hideOverlay doc page works great to isVisible = true my previously isVisible = false’d native.newTextField(), but that method doesn’t bring back the button. I also tried to .alpha = 0 to hide and .alpha = 1 to show, but this also did not bring the button back.
Any ideas?
In parent scene:
[lua]local function goToHelp()
newWordField.isVisible = false
newWordSentenceField.isVisible = false
--backBtn.alpha = 0
backBtn.isVisible = false
local options = {
isModal = true
}
composer.showOverlay(“listHelp”, options)
end[/lua]
&
[lua]function scene:resume( event )
--backBtn.alpha = 1
backBtn.isVisible = true
newWordField.isVisible = true
newWordSentenceField.isVisible = true
end[/lua]
In overlay scene:
[lua]function scene:hide( event )
local sceneGroup = self.view
local phase = event.phase
local parent = event.parent
if ( phase == “will” ) then
parent:resume()
elseif ( phase == “did” ) then
end
end[/lua]