Make back exit the library group

This commit is contained in:
Nick Bisby 2019-10-12 16:23:44 -05:00
parent 52fc6ec193
commit e1839b66cd
2 changed files with 10 additions and 8 deletions

View File

@ -32,7 +32,8 @@ sub Main()
else if isNodeEvent(msg, "backPressed")
' Pop a group off the stack and expose what's below
n = m.scene.getChildCount() - 1
if n = 0
if n = 1
' Overhang + last scene... this is the end
return
end if
m.scene.removeChildIndex(n)

View File

@ -106,18 +106,19 @@ end sub
function CreateLibraryScene()
' Main screen after logging in. Shows the user's libraries
libscene = CreateObject("roSGNode", "Library")
group = CreateObject("roSGNode", "Library")
libs = LibraryList()
libscene.libraries = libs
libscene.observeField("librarySelected", m.port)
group.libraries = libs
group.observeField("librarySelected", m.port)
group.observeField("backPressed", m.port)
library = libscene.findNode("LibrarySelect")
library = group.findNode("LibrarySelect")
search = libscene.findNode("search")
search = group.findNode("search")
sidepanel = libscene.findNode("options")
sidepanel = group.findNode("options")
new_options = []
options_buttons = [
{"title": "Change server", "id": "change_server"},
@ -146,7 +147,7 @@ function CreateLibraryScene()
sidepanel.options = new_options
return libscene
return group
end function
function CreateMovieScene(library)