Add the hello world Roku app as a base

This commit is contained in:
Nick Bisby 2019-01-29 22:19:27 -06:00
commit 6e34b0453f
No known key found for this signature in database
GPG Key ID: F6E0C4E6D0B5EB36
10 changed files with 101 additions and 0 deletions

10
Makefile Normal file
View File

@ -0,0 +1,10 @@
#
# Copyright (c) 2015 Roku, Inc. All rights reserved.
# Simple Makefile for Roku Channel Development
#
APPNAME = hello-world
IMPORTS =
APPSROOT = ..
include $(APPSROOT)/app.mk

37
components/helloworld.xml Normal file
View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8" ?>
<component name="HelloWorld" extends="Scene">
<children>
<Label id="myLabel"
text="Hello me!"
width="1280"
height="720"
horizAlign="center"
vertAlign="center"
/>
</children>
<!-- BrightScript Portion -->
<script type="text/brightscript" >
<![CDATA[
'**
'** Example: Edit a Label size and color with BrightScript
'**
function init()
m.top.setFocus(true)
m.myLabel = m.top.findNode("myLabel")
'Set the font size
m.myLabel.font.size=92
'Set the color to light blue
m.myLabel.color="0x72D7EEFF"
'**
'** The full list of editable attributes can be located at:
'** http://sdkdocs.roku.com/display/sdkdoc/Label#Label-Fields
'**
end function
]]>
</script>
<!-- End of BrightScript Portion -->
</component>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
images/splash-screen_hd.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
images/splash-screen_sd.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

27
manifest Normal file
View File

@ -0,0 +1,27 @@
#
# Copyright (c) 2015 Roku, Inc. All rights reserved.
# Roku Channel Manifest File
# Full spec at bit.ly/roku-manifest-file
#
## Channel Details
title=Hello World
major_version=1
minor_version=0
build_version=00001
## Channel Assets
### Main Menu Icons / Channel Poster Artwork
#### Image sizes are FHD: 540x405px | HD: 290x218px | SD: 214x144px
mm_icon_focus_fhd=pkg:/images/channel-poster_fhd.png
mm_icon_focus_hd=pkg:/images/channel-poster_hd.png
mm_icon_focus_sd=pkg:/images/channel-poster_sd.png
### Splash Screen + Loading Screen Artwork
#### Image sizes are FHD: 1920x1080px | HD: 1280x720px | SD: 720x480px
splash_screen_fhd=pkg:/images/splash-screen_fhd.jpg
splash_screen_hd=pkg:/images/splash-screen_hd.jpg
splash_screen_sd=pkg:/images/splash-screen_sd.jpg
splash_color=#000000
splash_min_time=1

27
source/Main.brs Normal file
View File

@ -0,0 +1,27 @@
'*************************************************************
'** Hello World example
'** Copyright (c) 2015 Roku, Inc. All rights reserved.
'** Use of the Roku Platform is subject to the Roku SDK Licence Agreement:
'** https://docs.roku.com/doc/developersdk/en-us
'*************************************************************
sub Main()
print "in showChannelSGScreen"
'Indicate this is a Roku SceneGraph application'
screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort")
screen.setMessagePort(m.port)
'Create a scene and load /components/helloworld.xml'
scene = screen.CreateScene("HelloWorld")
screen.show()
while(true)
msg = wait(0, m.port)
msgType = type(msg)
if msgType = "roSGScreenEvent"
if msg.isScreenClosed() then return
end if
end while
end sub