私はデバイスと1つの基本的なhello worldプログラムでもrokuの設定を行っています。ロクの基本的なアプリケーションの作成
次は、ロゴを使ってレイアウトのアライメントを作成したいものです。そのためにソースを検索するのは非常に難しいです。誰でもこの問題を解決するために私を助けることができますか?
私はデバイスと1つの基本的なhello worldプログラムでもrokuの設定を行っています。ロクの基本的なアプリケーションの作成
次は、ロゴを使ってレイアウトのアライメントを作成したいものです。そのためにソースを検索するのは非常に難しいです。誰でもこの問題を解決するために私を助けることができますか?
これは本当に詳細な説明がなくても答えることのできない質問です。これを行うにはさまざまな方法があります。最も簡単な方法は roScreenまたはroImagecanvasで説明したとおりですが、それぞれの選択肢にはさらに質問が必要です。 Roku SDKの例を参照してください。面白そうに見えるものを見つけて、それらを読み込んでソースコードを見ると、そこに多くの答えが見つかります。
最初にこれらのファイルを作成します。components.Thenでソースフォルダ内main.brs、LayoutTop.xml、LayoutTop.brs、HomeScene.xmlと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
ことができますあなたはcを投稿する_basicこんにちは世界プログラムのode? – Shashanth