Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
johnmarsden
Visitor

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 2
NB_
Roku Guru

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
Visitor

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
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.