0
A
回答
1
这真的不是一个没有更多细节的答复问题。有不同的做法。执行的最简单方法就是您所描述的将与roScreen或roImagecanvas一起使用,但这些选择中的每一个都需要更多的问题。 查看Roku SDK中的示例。找到看起来有趣的东西,并侧重加载它们并查看源代码,您会在那里找到许多答案。
0
首先创建这些文件:在源文件夹main.brs,LayoutTop.xml,LayoutTop.brs,HomeScene.xml和components.Then HomeScene.brs在这些文件中添加以下代码: main.brs文件:
sub Main()
showSGScreen()
end sub
sub showSGScreen()
screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort")
screen.setMessagePort(m.port)
m.scene = screen.CreateScene("HomeScene")
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
LayoutTop.xml:
<?xml version="1.0" encoding="UTF-8"?>
<component name="layoutTop" extends="Group" xsi:noNamespaceSchemaLocation="https://devtools.web.roku.com/schema/RokuSceneGraph.xsd">
<script type="text/brightscript" uri="pkg:/components/LayoutTop.brs"/>
<children>
<Poster
id="backgroundPoster"
uri="pkg:/images/backgroundTop.jpg"
width="1920"
height="150"
translation="[0, 0]"
/>
<Poster
id="icon"
uri="pkg:/images/html5.png"
width="128"
height="128"
translation="[10, 10]"
/>
</children>
</component>
LayoutTop.brs:
sub init()
end sub
HomeScene.xml:
<?xml version="1.0" encoding="UTF-8"?>
<component name = "HomeScene" extends = "Scene" >
<script type="text/brightscript" uri="pkg:/components/HomeScene.brs"/>
<children>
<Poster
id="background"
uri="pkg:/images/background.jpg"
width="1920"
height="1080"
translation="[0, 0]"
/>
<Group >
<layoutTop
translation="[0, 0]"
/>
</Group>
</children>
</component>
HomeScene.brs:
sub init()
end sub
相关问题
- 1. 创建基本应用程序 - MEAN
- 2. 从Roku应用程序开发
- 3. 应用程序突然崩溃Roku
- 4. 基本聊天应用程序使用Socket.io和Node js创建
- 5. 创建与Rails的一个基本的Facebook应用程序
- 6. 指导创建“基本”Java Web应用程序
- 7. 基于iPhone/iPad的应用程序创建文本内容
- 8. 如何创建基本的托盘图标应用程序?
- 9. 如何创建本地化的基地应用程序android
- 10. 如何创建基本的跨平台应用程序
- 11. 创建一个基本的网络应用程序
- 12. 创建基本内容浏览iPhone应用程序
- 13. 从另一个基本应用程序创建应用程序时更改应用程序标识
- 14. 创建一个基本绘图程序
- 15. 为X86创建本机应用程序?
- 16. 创建本地Web应用程序
- 17. 为基于JavaScript的应用程序创建安装程序
- 18. 创建反应本机应用程序 - 使用本机模块
- 19. 创建子应用程序
- 20. 上创建应用程序
- 21. 创建Android应用程序
- 22. 创建应用程序
- 23. 创建WiFi应用程序
- 24. Jawbone创建应用程序
- 25. 创建Web应用程序
- 26. 创建Facebook应用程序
- 27. 创建Google+应用程序
- 28. 创建Twitter应用程序
- 29. 创建Facebook应用程序
- 30. 创建Android应用程序
灿你张贴了c _basic hello world program的颂歌too_? – Shashanth