Rounded corners on Items in new ItemGrid
This commit is contained in:
parent
146e00b23b
commit
64dd9962c4
|
@ -1,6 +1,9 @@
|
|||
sub init()
|
||||
m.posterMask = m.top.findNode("posterMask")
|
||||
m.itemPoster = m.top.findNode("itemPoster")
|
||||
m.itemText = m.top.findNode("itemText")
|
||||
|
||||
m.itemText.translation = [0, m.itemPoster.height + 7]
|
||||
end sub
|
||||
|
||||
sub itemContentChanged()
|
||||
|
@ -9,14 +12,12 @@ sub itemContentChanged()
|
|||
|
||||
if itemData = invalid then return
|
||||
|
||||
itemPoster = m.top.findNode("itemPoster")
|
||||
|
||||
if itemData.type = "Movie" then
|
||||
itemPoster.uri = itemData.PosterUrl
|
||||
m.itemPoster.uri = itemData.PosterUrl
|
||||
m.itemText.text = itemData.Title
|
||||
return
|
||||
else if itemData.type = "Series" then
|
||||
itemPoster.uri = itemData.PosterUrl
|
||||
m.itemPoster.uri = itemData.PosterUrl
|
||||
m.itemText.text = itemData.Title
|
||||
return
|
||||
end if
|
||||
|
@ -28,8 +29,8 @@ end sub
|
|||
'
|
||||
'Use FocusPercent to animate scaling of Poser Image
|
||||
sub focusChanging()
|
||||
scaleFactor = 1 + (m.top.focusPercent * 0.17333)
|
||||
m.itemPoster.scale = [scaleFactor, scaleFactor]
|
||||
scaleFactor = 0.85 + (m.top.focusPercent * 0.15)
|
||||
m.posterMask.scale = [scaleFactor, scaleFactor]
|
||||
end sub
|
||||
|
||||
'
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<component name="GridItem" extends="Group">
|
||||
<children>
|
||||
<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" />
|
||||
<maskGroup id="posterMask" maskUri="pkg:/images/postermask.png" scaleRotateCenter="[145, 212.5]" scale="[0.85,0.85]" >
|
||||
<Poster id="itemPoster" width="290" height="425" loadDisplayMode="scaleToZoom" loadingBitmapUri="pkg:/images/PosterLoading.png" failedBitmapUri="pkg:/images/PosterFailed.png" />
|
||||
</maskGroup>
|
||||
<ScrollingLabel id="itemText" horizAlign="center" font="font:SmallSystemFont" maxWidth="290" repeatCount="-1" visible="false" />
|
||||
</children>
|
||||
<interface>
|
||||
<field id="itemContent" type="node" onChange="itemContentChanged" />
|
||||
|
|
BIN
images/postermask.png
Normal file
BIN
images/postermask.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
Loading…
Reference in New Issue
Block a user