deviceInfo = CreateObject( "roDeviceInfo" )
displaySize = deviceInfo.GetDisplaySize()
background = {
Color: "#000000"
}
loadingImage = {
Url: "pkg:/images/mm_icon_focus_hd.png"
TargetRect: {
x: Int( displaySize.w / 2 ) - Int( 336 / 2 ),
y: Int( displaySize.h / 2 ) - Int( 209 / 2 ),
w: 336,
h: 209
}
}
loadingText = {
Text: "Loading...",
TextAttrs: {
Font: "Large",
VAlign: "Top"
},
TargetRect: {
x: loadingImage.TargetRect.x,
y: loadingImage.TargetRect.y + 25,
w: loadingImage.TargetRect.w,
h: 30
}
}
canvas = CreateObject( "roImageCanvas" )
canvas.SetLayer( 0, [ background, loadingImage, loadingText ] )
canvas.Show()
006: Sub RunUserInterface()
007:
008: deviceInfo = CreateObject( "roDeviceInfo" )
009: displaySize = deviceInfo.GetDisplaySize()
010: background = {
011: Color: "#000000"
012: }
013: loadingImage = {
014: Url: "pkg:/images/MainMenu_Icon_CenterFocus_HD.png"
015: TargetRect: {
016: x: Int( displaySize.w / 2 ) - Int( 336 / 2 ),
017: y: Int( displaySize.h / 2 ) - Int( 209 / 2 ),
018: w: 336,
019: h: 209
020: }
021: }
022: loadingText = {
023: Text: "Loading...",
024: TextAttrs: {
025: Font: "Large",
026: VAlign: "Top"
027: },
028: TargetRect: {
029: x: loading.TargetRect.x,
030: y: loading.TargetRect.y + 25,
031: w: loading.TargetRect.w,
032: h: 30
033: }
034: }
035: canvas = CreateObject( "roImageCanvas" )
036: canvas.SetLayer( 0, [ background, loadingImage, loadingText ] )
037: canvas.Show()
038:
039: showWelcomeScreen()
040: homeMain()
041:
042:
043: End Sub
/tmp/plugin/NEAAAAa9pBYR/pkg:/source/appMain.brs(29): runtime error ec: 'Dot' Op
erator attempted with invalid BrightScript Component or interface reference.
029: x: loading.TargetRect.x,
Backtrace:
Function runuserinterface() As Void
039: showWelcomeScreen()
040: homeMain()
Sub RunUserInterface()
deviceInfo = CreateObject( "roDeviceInfo" )
displaySize = deviceInfo.GetDisplaySize()
background = {
Color: "#000000"
}
loadingImage = {
Url: "pkg:/images/MainMenu_Icon_CenterFocus_HD.png"
TargetRect: {
x: Int( displaySize.w / 2 ) - Int( 336 / 2 ),
y: Int( displaySize.h / 2 ) - Int( 209 / 2 ),
w: 336,
h: 209
}
}
loadingText = {
Text: "Loading...",
TextAttrs: {
Font: "Large",
VAlign: "Top"
},
TargetRect: {
x: loading.TargetRect.x,
y: loading.TargetRect.y + 25,
w: loading.TargetRect.w,
h: 30
}
}
canvas = CreateObject( "roImageCanvas" )
canvas.SetLayer( 0, [ background, loadingImage, loadingText ] )
canvas.Show()
initTheme()
showWelcomeScreen()
homeMain()
End Sub
'display a fake screen while the real one initializes. this screen
'has to live for the duration of the whole app to prevent flashing
'back to the roku home screen.
screenFacade = CreateObject("roPosterScreen")
screenFacade.show()
showWelcomeScreen()
homeMain()
'exit the app gently so that the screen doesn't flash to black
screenFacade.showMessage("")
sleep(25)
Sub RunUserInterface()
deviceInfo = CreateObject( "roDeviceInfo" )
displaySize = deviceInfo.GetDisplaySize()
background = {
Color: "#000000"
}
loadingImage = {
Url: "pkg:/images/Logo.png"
TargetRect: {
x: Int( displaySize.w / 2 ) - Int( 336 / 2 ),
y: Int( displaySize.h / 2 ) - Int( 209 / 2 ),
w: 365,
h: 110
}
}
loadingText = {
Text: "Loading...",
TextAttrs: {
Font: "Large",
VAlign: "Bottom"
},
TargetRect: {
x: loadingImage.TargetRect.x,
y: loadingImage.TargetRect.y + 225,
w: loadingImage.TargetRect.w,
h: 30
}
}
canvas = CreateObject( "roImageCanvas" )
canvas.SetLayer( 0, [ background, loadingImage, loadingText ] )
canvas.Show()
initTheme()
screenFacade = CreateObject("roPosterScreen")
screenFacade.show()
showWelcomeScreen()
homeMain()
screenFacade.showMessage("")
sleep(25)
End Sub