Apply focus after attaching node to scene

This fixes problems where focus was not properly applied to videos resulting in lack of controls
This commit is contained in:
JD Layman 2021-09-21 11:19:33 -05:00
parent 692cb8e922
commit 6c03736e41
2 changed files with 7 additions and 21 deletions

View File

@ -31,6 +31,13 @@ sub push(newGroup)
m.groups.push(newGroup)
' TODO: figure out a better way to do this without relying on indexing
if currentGroup <> invalid
m.scene.replaceChild(newGroup, 1)
else
m.scene.appendChild(newGroup)
end if
'observe info about new group, set overhang title, etc.
if newGroup.isSubType("JFGroup")
registerOverhangData(newGroup)
@ -45,13 +52,6 @@ sub push(newGroup)
newGroup.control = "play"
m.overhang.visible = false
end if
' TODO: figure out a better way to do this without relying on indexing
if currentGroup <> invalid
m.scene.replaceChild(newGroup, 1)
else
m.scene.appendChild(newGroup)
end if
end sub
'

View File

@ -1,14 +0,0 @@
'
' Create a SceneManager instance to help manage application groups
function InitSceneManager(scene as object) as object
' Create a node object so data is passed by reference and to avoid
' having to re-save associative array in global variable.
groupStack = CreateObject("roSGNode", "GroupStack")
obj = {
groupStack: groupStack,
pushGroup: sub(group) : m.groupStack.callFunc("push", group) : end sub,
popGroup: sub() : m.groupStack.callFunc("pop") : end sub,
peekGroup: function() : return m.groupStack.callFunc("peek") : end function
}
return obj
end function