1 parent
deeed05383
commit
e8fd7ee35d
13 files changed
+61
-27
No files matched your search
@@ -2,13 +2,15 @@ import "pkg:/source/utils/TimeUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
FindChildren()
|
||||
end function
|
||||
|
||||
function FindChildren()
|
||||
m.titleLabel = m.top.findNode("titleLabel")
|
||||
m.authorLabel = m.top.findNode("authorLabel")
|
||||
m.thumbnail = m.top.findNode("thumbnail")
|
||||
m.durationRect = m.top.FindNode("durationRect")
|
||||
m.durationLabel = m.top.FindNode("durationLabel")
|
||||
|
||||
m.thumbnail.failedBitmapUri = "pkg:/images/thumbnail-missing.jpg"
|
||||
end function
|
||||
|
||||
function OnContentSet() as void
|
||||
@@ -18,6 +20,10 @@ function OnContentSet() as void
|
||||
return
|
||||
end if
|
||||
|
||||
if m.titleLabel = invalid
|
||||
FindChildren()
|
||||
end if
|
||||
|
||||
m.titleLabel.text = content.title
|
||||
m.authorLabel.text = content.author
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
id="thumbnail"
|
||||
loadDisplayMode="scaleToZoom"
|
||||
width="190"
|
||||
height="106">
|
||||
height="106"
|
||||
failedBitmapUri="pkg:/images/thumbnail-missing.jpg">
|
||||
<Rectangle
|
||||
id="durationRect"
|
||||
width="60"
|
||||
|
||||
Reference in new issue
Block a user