storyboard.showOverlay() - is the isModal key functional? Other solutions for preventing touches from going through overlay?

Hi All,

I’m using the .971 release and am having no luck with “isModal=true” preventing touches from going through to my active scene below the overlay I’ve called up. This is wreaking havoc on the state of my game so I’d love to solve the issue :slight_smile:

Has anyone had success with passing this key to prevent touches from propagating through the overlay?

Please let me know if you’ve had any success with preventing touches from going through or if there’s some other approach I could take (add an invisible display sized object as the bottom level of my overlay? What would I need to add to that to prevent touches from going through?)

Thanks [import]uid: 105707 topic_id: 36059 reply_id: 336059[/import]

Hi EHO.

It took sometime for me to fully understand the overLay and I hope that some of the info below helps you with your problem.

In my case, I have a overlay scene that appears as “pop-up” at the end of the game and shows the score and some buttons.

If I just use “isModal=true” when calling the overLay scene, the touch on the “popup” is disabled as I would expect, but the touch in areas outside the popup still works. So, I solved that problem calling the background:removeListener() before calling the overlay scene.

Another thing that tricked me a lot was when the overlay appears while the user was still touching the screen (my game ends when the time goes to zero). In that case, the removeListener does not work and so my overlay scene get buggy, and the touch events in the buttons does not work. I solved that problem forcing the touch event before calling the overlay to became .phase = “ended”. So, before I call the overlay, the event is terminated and the removeListener works normally.
Renato
Red Beach Games
Try our new game Puzzle You for free here!
[import]uid: 181011 topic_id: 36059 reply_id: 143272[/import]

Hi EHO.

It took sometime for me to fully understand the overLay and I hope that some of the info below helps you with your problem.

In my case, I have a overlay scene that appears as “pop-up” at the end of the game and shows the score and some buttons.

If I just use “isModal=true” when calling the overLay scene, the touch on the “popup” is disabled as I would expect, but the touch in areas outside the popup still works. So, I solved that problem calling the background:removeListener() before calling the overlay scene.

Another thing that tricked me a lot was when the overlay appears while the user was still touching the screen (my game ends when the time goes to zero). In that case, the removeListener does not work and so my overlay scene get buggy, and the touch events in the buttons does not work. I solved that problem forcing the touch event before calling the overlay to became .phase = “ended”. So, before I call the overlay, the event is terminated and the removeListener works normally.
Renato
Red Beach Games
Try our new game Puzzle You for free here!
[import]uid: 181011 topic_id: 36059 reply_id: 143272[/import]

Hi EHO.

It took sometime for me to fully understand the overLay and I hope that some of the info below helps you with your problem.

In my case, I have a overlay scene that appears as “pop-up” at the end of the game and shows the score and some buttons.

If I just use “isModal=true” when calling the overLay scene, the touch on the “popup” is disabled as I would expect, but the touch in areas outside the popup still works. So, I solved that problem calling the background:removeListener() before calling the overlay scene.

Another thing that tricked me a lot was when the overlay appears while the user was still touching the screen (my game ends when the time goes to zero). In that case, the removeListener does not work and so my overlay scene get buggy, and the touch events in the buttons does not work. I solved that problem forcing the touch event before calling the overlay to became .phase = “ended”. So, before I call the overlay, the event is terminated and the removeListener works normally.
Renato
Red Beach Games
Try our new game Puzzle You for free here!
[import]uid: 181011 topic_id: 36059 reply_id: 143272[/import]

Hi EHO.

It took sometime for me to fully understand the overLay and I hope that some of the info below helps you with your problem.

In my case, I have a overlay scene that appears as “pop-up” at the end of the game and shows the score and some buttons.

If I just use “isModal=true” when calling the overLay scene, the touch on the “popup” is disabled as I would expect, but the touch in areas outside the popup still works. So, I solved that problem calling the background:removeListener() before calling the overlay scene.

Another thing that tricked me a lot was when the overlay appears while the user was still touching the screen (my game ends when the time goes to zero). In that case, the removeListener does not work and so my overlay scene get buggy, and the touch events in the buttons does not work. I solved that problem forcing the touch event before calling the overlay to became .phase = “ended”. So, before I call the overlay, the event is terminated and the removeListener works normally.
Renato
Red Beach Games
Try our new game Puzzle You for free here!
[import]uid: 181011 topic_id: 36059 reply_id: 143272[/import]