I used Custom SGDex View in MainScene and Using the below code, I have opened the dialog box inside PostGrid. It's Extends With the Group node.
sub init()
m.postergrid = m.top.findNode("PosterGrid")
m.top.GlobleURL = GetAuthData("url")
m.readPosterGridTask = createObject("roSGNode", "ContentReader")
m.readPosterGridTask.contenturi = "http://" + m.top.GlobleURL + "/api/DefaultAPI/?file=GoForwards.xml"
m.readPosterGridTask.observeField("content", "showpostergrid")
m.readPosterGridTask.control = "RUN"
end sub
function OpenDialog()
m.dlg = createObject("roSGNode", "Dialog")
m.port = createObject("roMessagePort")
m.dlg.observeField("wasClosed", m.port)
m.dlg.title = "Menu"
m.dlg.buttons = ["ReverseOrder"]
m.dlg.observeField("buttonSelected", "onVerifyOptions")
m.dlg.getScene().dialog = m.dlg
end function
function onVerifyOptions()
if m.dlg.getScene().dialog.buttonSelected = 0 then
?"onVerifyOption() :: 0 index"
m.readPosterGridTask.contenturi = "http://" + m.top.GlobleURL + "/api/DefaultAPI/?file=ReverseOrder.xml"
m.readPosterGridTask.observeField("content", "showpostergrid")
m.readPosterGridTask.control = "RUN"
m.dlg.getScene().dialog.close = true
end if
return true
end function
sub showpostergrid()
m.postergrid.content = m.readPosterGridTask.content
end sub
Inside a Dialog Box click to 0 indexes. I update the content like the above code. But, Here Image not loaded. After, I refresh Content Render. But, When Roku Set-top Box is going sleep mode. After I clicked Ok, It starts to load. I don't know why this is happening. the same thing, I check inside a scene node. It's working fine. But, Inside a Group node, I found this issue. Does anyone know about this issue?