Animate Poster Scaling
This commit is contained in:
parent
68e322b1ca
commit
4fe3e0dac2
|
@ -22,18 +22,19 @@ sub itemContentChanged()
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
'
|
'
|
||||||
'Resize Poster and Title Vivbility on focus change
|
'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()
|
sub focusChanged()
|
||||||
|
|
||||||
if m.top.itemHasFocus = true then
|
if m.top.itemHasFocus = true then
|
||||||
m.itemPoster.width = 295
|
|
||||||
m.itemPoster.height = 440
|
|
||||||
m.itemPoster.translation = [0,0]
|
|
||||||
m.itemText.visible = true
|
m.itemText.visible = true
|
||||||
else
|
else
|
||||||
m.itemPoster.width = 250
|
|
||||||
m.itemPoster.height = 375
|
|
||||||
m.itemPoster.translation = [21,35]
|
|
||||||
m.itemText.visible = false
|
m.itemText.visible = false
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<component name="GridItem" extends="Group">
|
<component name="GridItem" extends="Group">
|
||||||
<children>
|
<children>
|
||||||
<Poster id="itemPoster" width="250" height="375" translation="[21,35]" loadDisplayMode="scaleToZoom" loadingBitmapUri="pkg:/images/PosterLoading.png" failedBitmapUri="pkg:/images/PosterFailed.png" />
|
<Poster id="itemPoster" width="250" height="375" translation="[21,35]" loadDisplayMode="scaleToZoom" loadingBitmapUri="pkg:/images/PosterLoading.png" failedBitmapUri="pkg:/images/PosterFailed.png" scaleRotateCenter="[147.5, 220]" />
|
||||||
<ScrollingLabel id="itemText" horizAlign="center" font="font:SmallSystemFont" maxWidth="295" translation="[0,442]" repeatCount="-1" visible="false" />
|
<ScrollingLabel id="itemText" horizAlign="center" font="font:SmallSystemFont" maxWidth="295" translation="[0,442]" repeatCount="-1" visible="false" />
|
||||||
</children>
|
</children>
|
||||||
<interface>
|
<interface>
|
||||||
<field id="itemContent" type="node" onChange="itemContentChanged" />
|
<field id="itemContent" type="node" onChange="itemContentChanged" />
|
||||||
<field id="itemHasFocus" type="boolean" onChange="focusChanged" />
|
<field id="itemHasFocus" type="boolean" onChange="focusChanged" />
|
||||||
|
<field id="focusPercent" type="float" onChange="focusChanging" />
|
||||||
</interface>
|
</interface>
|
||||||
<script type="text/brightscript" uri="GridItem.brs" />
|
<script type="text/brightscript" uri="GridItem.brs" />
|
||||||
</component>
|
</component>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user