diff --git a/components/ItemGrid2/GridItem.brs b/components/ItemGrid2/GridItem.brs new file mode 100644 index 000000000..c857f3906 --- /dev/null +++ b/components/ItemGrid2/GridItem.brs @@ -0,0 +1,41 @@ +sub init() + m.itemPoster = m.top.findNode("itemPoster") + m.itemText = m.top.findNode("itemText") +end sub + +sub itemContentChanged() + + itemData = m.top.itemContent + + if itemData = invalid then return + + itemPoster = m.top.findNode("itemPoster") + + if itemData.type = "Movie" then + itemPoster.uri = itemData.PosterUrl + m.itemText.text = itemData.Title + return + end if + + print "Unhandled Item Type: " + itemData.type + +end sub + +' +'Use FocusPercent to animate scaling of Poser Image +sub focusChanging() + scaleFactor = 1 + (m.top.focusPercent * 0.17333) + m.itemPoster.scale = [scaleFactor, scaleFactor] +end sub + +' +'Display or hide title Visibility on focus change +sub focusChanged() + + if m.top.itemHasFocus = true then + m.itemText.visible = true + else + m.itemText.visible = false + end if + +end sub diff --git a/components/ItemGrid2/GridItem.xml b/components/ItemGrid2/GridItem.xml new file mode 100644 index 000000000..8fcf9fd99 --- /dev/null +++ b/components/ItemGrid2/GridItem.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + +