Hi Guys.
Have written a small app with 6 screens - each performing a different function.
As I move from one screen to the next, I use the following to remove the previous screen:
prevScene = composer.getSceneName(“previous”)
if prevScene ~= nil then
composer.removeScene(prevScene)
end
I’ve read and re-read the tutorial on creating scenes in composer, but the tutorial doesn’t really address removal/deactivation of buttons from a previous scene. At one point, the tutorial states:
composer.removeScene( “game” )
Essentially, this command removes and destroys the game.lua scene as if it never existed.
My mileage would suggest it DOESN"T ‘destroy the scene as if it never existed’, because the problem I have, is that buttons from any previously loaded screen are still active on the current screen, even though they are no longer visible. This is causing untold issues as you can imagine.
I’d like to think I’m just missing a single line of code somewhere that removes or deactivates the buttons, but can’t find any such command.
I’m developing my code on Win10 for Android, and run the beta on a Samsung Galaxy 8. My simulator is 2017.3184, The fault was first found in the compiled beta on my phone, but since trialled and found to exist in the simulator also.
Surely there is an easy fix for this. What do I need to do to actually remove, or deactivate the buttons when I remove a scene?
Thanks for any assistance…