Skip to content

Commit

Permalink
add better styles to podcast scene
Browse files Browse the repository at this point in the history
  • Loading branch information
rorpage committed Jun 8, 2019
1 parent 4d1a25d commit cce3596
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 33 deletions.
7 changes: 2 additions & 5 deletions components/PodcastScene.brs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@ sub OnWasShown()
' m.global.observeField("FF", "FF")
' m.global.observeField("Rewind", "Rewind")

m.episode_title = m.top.findNode("episode_title")
m.episode_description = m.top.findNode("episode_description")

m.audiolist = m.top.findNode("audioLabelList")
m.audiolist.observeField("itemFocused", "updateFocused")
m.audiolist.observeField("itemSelected", "playaudio")

' font = createObject("RoSGNode", "Font")
' font.uri = "pkg:/components/fonts/avenir_35_light_latin.ttf"
' m.audiolist.focusedFont = font
' m.audiolist.font = font

m.audio = createObject("RoSGNode", "Audio")
m.audio.observeField("state", "controlaudioplay")

Expand All @@ -42,6 +38,7 @@ sub updateFocused()
episode = getSelectedEpisode()

m.show_art.uri = episode.hdPosterUrl
m.episode_title.text = episode.title
m.episode_description.text = episode.Description
end sub

Expand Down
63 changes: 35 additions & 28 deletions components/PodcastScene.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,44 @@
<script type="text/brightscript" uri="pkg:/components/PodcastScene.brs" />
<children>
<Group>
<LabelList
id="audioLabelList"
translation="[180, 100]"
focusedColor="0xFFFFFFFF"
focusBitmapUri=""
focusFootprintBitmapUri=""
color="0x121212FF"
itemSize="[500, 60]">
<Font
role="font"
<PosterGrid
id="audioLabelList"
translation="[20, 20]"
basePosterSize="[340, 340]"
itemSpacing="[16, 16]"
caption1NumLines="1"
numColumns="3"
numRows="2">
<Font
role="caption1Font"
uri="pkg:/components/fonts/avenir_35_light_latin.ttf"
id="avenir-light"
size="30" />
<Font
role="focusedFont"
uri="pkg:/components/fonts/avenir_35_light_latin.ttf"
id="avenir-light"
size="30" />
</LabelList>
<Label
id="episode_description"
width="800"
wrap="true"
color="0xFFFFFFFF"
translation="[800, 100]">
<Font
role="font"
uri="pkg:/components/fonts/avenir_35_light_latin.ttf"
id="avenir-light"
size="30" />
</Label>
</PosterGrid>
<LayoutGroup itemSpacings="[0, 40]" translation="[1100, 20]">
<Label
id="episode_title"
width="800"
wrap="true"
color="0xFFFFFFFF">
<Font
role="font"
uri="pkg:/components/fonts/avenir_35_light_latin.ttf"
id="avenir-light"
size="34" />
</Label>
<Label
id="episode_description"
width="800"
wrap="true"
color="0xFFFFFFFF">
<Font
role="font"
uri="pkg:/components/fonts/avenir_35_light_latin.ttf"
id="avenir-light"
size="28" />
</Label>
</LayoutGroup>
</Group>
<Group translation="[0, -30]">
<Rectangle
Expand Down
1 change: 1 addition & 0 deletions components/tasks/PodcastTask.brs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function executeTask() as void
podcast_content = content.CreateChild("ContentNode")
podcast_content.id = podcast.id
podcast_content.title = podcast.title
podcast_content.shortDescriptionLine1 = podcast.title
podcast_content.url = podcast.media_url
podcast_content.hdPosterUrl = podcast.featured_image

Expand Down

0 comments on commit cce3596

Please sign in to comment.