Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
johnmarsden
Level 7

Scene Graph back button

Right now, the back button is exiting me out of my application. I'm displaying a modal by changing opacity on 2 groups but I want to use the back button to close it. It doesn't actually change the screen.. it just modifies the state. Can I catch the back button so it doesn't exit me out of the view? This is a pretty principal part of my application that I'm hoping won't be limited by auto functioning back button.

Or it's possible I have some legacy code in here. 

So question is: Can I catch the back button for Scene Graph without it exiting my current screen?

Thanks!
0 Kudos
2 Replies
Roku Employee
Roku Employee

Re: Scene Graph back button

Which Node has the input focus? See https://sdkdocs.roku.com/display/sdkdoc/ifSGNodeFocus

It would seem backExitsScene = true and nobody is handling the Back button before it bubbles up to the Scene.

Note also there is a simple way of displaying modal dialog by assigning it to the .dialog field of the Scene, then it handles the rest - incl. closing with Back.
0 Kudos
johnmarsden
Level 7

Re: Scene Graph back button

This is great to know. Thanks!

My modals are more like tooltips around the page, but your tip about generic modals is great.
0 Kudos