Merge pull request #236 from neilsb/roku-safe-zone
Move content into Roku Safe Zones
This commit is contained in:
commit
e84697ad7e
|
@ -17,15 +17,16 @@ sub updateSize()
|
||||||
|
|
||||||
dimensions = m.top.getScene().currentDesignResolution
|
dimensions = m.top.getScene().currentDesignResolution
|
||||||
|
|
||||||
border = 75
|
topBorder = 75
|
||||||
topSpace = border + 105
|
border = 96
|
||||||
m.top.translation = [border, topSpace]
|
topSpace = topBorder + 105
|
||||||
|
m.top.translation = [96, topSpace]
|
||||||
|
|
||||||
textHeight = 100
|
textHeight = 100
|
||||||
itemWidth = (dimensions["width"] - border*2) / m.top.itemsPerRow -20
|
itemWidth = (dimensions["width"] - border*2) / m.top.itemsPerRow -20
|
||||||
itemHeight = itemWidth * 1.5 + textHeight
|
itemHeight = itemWidth * 1.5 + textHeight
|
||||||
|
|
||||||
if itemHeight*m.top.rowsPerPage > (dimensions["height"] - border - 115) then
|
if itemHeight*m.top.rowsPerPage > (dimensions["height"] - topBorder - 115) then
|
||||||
ratio = (itemHeight*m.top.rowsPerPage) / (981 - topSpace - 15)
|
ratio = (itemHeight*m.top.rowsPerPage) / (981 - topSpace - 15)
|
||||||
itemHeight = itemHeight / ratio
|
itemHeight = itemHeight / ratio
|
||||||
itemWidth = itemWidth / ratio
|
itemWidth = itemWidth / ratio
|
||||||
|
|
|
@ -2,10 +2,10 @@ sub init()
|
||||||
m.top.optionsAvailable = false
|
m.top.optionsAvailable = false
|
||||||
|
|
||||||
main = m.top.findNode("main_group")
|
main = m.top.findNode("main_group")
|
||||||
main.translation = [50, 175]
|
main.translation = [96, 175]
|
||||||
|
|
||||||
overview = m.top.findNode("overview")
|
overview = m.top.findNode("overview")
|
||||||
overview.width = 1920 - 100 - 400
|
overview.width = 1920 - 96 - 300 - 96 - 30
|
||||||
|
|
||||||
m.top.findNode("buttons").setFocus(true)
|
m.top.findNode("buttons").setFocus(true)
|
||||||
end sub
|
end sub
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<LayoutGroup id="main_group" layoutDirection="horiz" itemSpacings="[30]">
|
<LayoutGroup id="main_group" layoutDirection="horiz" itemSpacings="[30]">
|
||||||
<Poster id="moviePoster"
|
<Poster id="moviePoster"
|
||||||
translation="[250,150]"
|
translation="[250,150]"
|
||||||
width="400" height="600" />
|
width="300" height="450" />
|
||||||
<LayoutGroup layoutDirection="vert" translation="[455, 150]" itemSpacings="[25]">
|
<LayoutGroup layoutDirection="vert" translation="[455, 150]" itemSpacings="[25]">
|
||||||
<LayoutGroup layoutDirection="horiz" itemSpacings="[100]" id="infoGroup">
|
<LayoutGroup layoutDirection="horiz" itemSpacings="[100]" id="infoGroup">
|
||||||
<Label id="releaseYear" />
|
<Label id="releaseYear" />
|
||||||
|
|
|
@ -3,7 +3,7 @@ sub init()
|
||||||
|
|
||||||
panel = m.top.findNode("panel")
|
panel = m.top.findNode("panel")
|
||||||
panel.panelSize = "small"
|
panel.panelSize = "small"
|
||||||
panel.leftPosition = 0
|
panel.leftPosition = 96
|
||||||
panel.focusable = true
|
panel.focusable = true
|
||||||
panel.hasNextPanel = false
|
panel.hasNextPanel = false
|
||||||
panel.leftOnly = true
|
panel.leftOnly = true
|
||||||
|
|
|
@ -14,8 +14,8 @@ end sub
|
||||||
sub updateSize()
|
sub updateSize()
|
||||||
dimensions = m.top.getScene().currentDesignResolution
|
dimensions = m.top.getScene().currentDesignResolution
|
||||||
|
|
||||||
border = 75
|
border = 96
|
||||||
m.top.translation = [border, border + 115]
|
m.top.translation = [border, 75 + 115]
|
||||||
|
|
||||||
textHeight = 80
|
textHeight = 80
|
||||||
itemWidth = (dimensions["width"] - border*2)
|
itemWidth = (dimensions["width"] - border*2)
|
||||||
|
|
|
@ -22,7 +22,7 @@ sub updateSize()
|
||||||
m.top.visible = true
|
m.top.visible = true
|
||||||
|
|
||||||
' size of the whole row
|
' size of the whole row
|
||||||
m.top.itemSize = [1720, itemHeight]
|
m.top.itemSize = [1700, itemHeight]
|
||||||
' spacing between rows
|
' spacing between rows
|
||||||
m.top.itemSpacing = [ 0, 0 ]
|
m.top.itemSpacing = [ 0, 0 ]
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
sub init()
|
sub init()
|
||||||
m.top.optionsAvailable = false
|
m.top.optionsAvailable = false
|
||||||
main = m.top.findNode("toplevel")
|
main = m.top.findNode("toplevel")
|
||||||
main.translation = [50, 175]
|
main.translation = [96, 175]
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
sub itemContentChanged()
|
sub itemContentChanged()
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
</LayoutGroup>
|
</LayoutGroup>
|
||||||
<Label id="genres" />
|
<Label id="genres" />
|
||||||
<Label id="tagline" />
|
<Label id="tagline" />
|
||||||
<Label id="overview" wrap="true" width="1420" maxLines="4" />
|
<Label id="overview" wrap="true" width="1400" maxLines="4" />
|
||||||
<Label id="history" />
|
<Label id="history" />
|
||||||
</LayoutGroup>
|
</LayoutGroup>
|
||||||
</LayoutGroup>
|
</LayoutGroup>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user