Skip to content

Commit

Permalink
update menu to point to CDN, add Horizons scene
Browse files Browse the repository at this point in the history
  • Loading branch information
rorpage committed Jun 4, 2019
1 parent 2019a3a commit 614d27d
Show file tree
Hide file tree
Showing 6 changed files with 329 additions and 3 deletions.
5 changes: 5 additions & 0 deletions components/HomeScene.brs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ function ShowView(selectedIndex as integer)
if selectedIndex = 1 then viewToShow = "PodcastScene"
if selectedIndex = 2 then viewToShow = "TodayScene"

if selectedIndex = 3 then
viewToShow = "HorizonsScene"
updateTheme("0x000000FF")
end if

view = CreateObject("roSGNode", viewToShow)
view.ObserveField("wasClosed", "onViewWasClosed")

Expand Down
43 changes: 43 additions & 0 deletions components/HorizonsScene.brs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
sub Init()
m.top.ObserveField("wasShown", "OnWasShown")
end sub

sub OnWasShown()
m.is_playing = false
m.blink_status = false

m.textblink_timer = m.top.findNode("textblink_timer")
m.textblink_timer.control = "start"
m.textblink_timer.ObserveField("fire", "blinkText")

m.left_side_row_2_flight = m.top.findNode("left_side_row_2_flight")
m.left_side_row_2_destination = m.top.findNode("left_side_row_2_destination")
m.left_side_row_2_service = m.top.findNode("left_side_row_2_service")
m.left_side_row_2_gate = m.top.findNode("left_side_row_2_gate")
m.left_side_row_2_status = m.top.findNode("left_side_row_2_status")

audiocontent = createObject("RoSGNode", "ContentNode")
audiocontent.url = "https://cdn3.wdwnt.com/music/Epcot%20-%20Horizons%20(Full%20Audio).mp3"

m.audio = m.top.findNode("audio")
m.audio.content = audiocontent
m.audio.control = "play"
end sub

sub blinkText()
color = "0xFFCC00FF"

if m.blink_status then
color = "0xFFCC00FF"
else
color = "0x000000FF"
end if

m.blink_status = not m.blink_status

m.left_side_row_2_flight.color = color
m.left_side_row_2_destination.color = color
m.left_side_row_2_service.color = color
m.left_side_row_2_gate.color = color
m.left_side_row_2_status.color = color
end sub
Loading

0 comments on commit 614d27d

Please sign in to comment.