Merge pull request #1315 from cewert/fix-moviedetails-buttons

This commit is contained in:
Charles Ewert 2023-06-24 10:37:26 -04:00 committed by GitHub
commit 75095c8951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 7 deletions

View File

@ -9,8 +9,6 @@ sub init()
m.options = m.top.findNode("movieOptions")
m.infoGroup = m.top.findNode("infoGroup")
m.main_group = m.top.findNode("main_group")
main = m.top.findNode("main_group")
main.translation = [96, 175]
overview = m.top.findNode("overview")
@ -25,9 +23,6 @@ sub init()
m.spinner = m.top.findNode("spinner")
m.trailerButton = m.top.findNode("trailer-button")
m.trailerButton.text = tr("Play Trailer")
m.top.observeField("itemContent", "itemContentChanged")
end sub
@ -41,7 +36,18 @@ sub OnScreenShown()
end sub
sub trailerAvailableChanged()
m.trailerButton.visible = m.top.trailerAvailable
if m.top.trailerAvailable
' add trailor button to button group
trailerButton = CreateObject("roSGNode", "JFButton")
trailerButton.id = "trailer-button"
trailerButton.text = tr("Play Trailer")
trailerButton.maxWidth = "300"
trailerButton.minWidth = "300"
m.buttonGrp.appendChild(trailerButton)
else
' remove trailor button from button group
m.buttonGrp.removeChild(m.top.findNode("trailer-button"))
end if
end sub
sub itemContentChanged()

View File

@ -34,7 +34,6 @@
<Button text="Options" id="options-button" iconUri="" focusedIconUri="" maxWidth="250" minWidth="250" />
<Button text="Watched" id="watched-button" iconUri="" focusedIconUri="" maxWidth="350" minWidth="300" />
<Button text="Favorite" id="favorite-button" iconUri="" focusedIconUri="" maxWidth="300" minWidth="300" />
<Button id="trailer-button" visible="false" iconUri="" focusedIconUri="" maxWidth="300" minWidth="300" />
</ButtonGroupHoriz>
<Label id="tagline" />
<Label id="overview" wrap="true" maxLines="8" />