Add a named overhang, to look nice
This commit is contained in:
parent
449d787d37
commit
1ed0466c6f
|
@ -27,7 +27,7 @@
|
|||
dimensions = m.top.getScene().currentDesignResolution
|
||||
|
||||
border = 200
|
||||
m.top.translation = [border, border]
|
||||
m.top.translation = [border, border + 115]
|
||||
|
||||
itemWidth = (dimensions["width"] - border*2) / m.top.rowSize
|
||||
itemHeight = 75
|
||||
|
@ -82,6 +82,7 @@
|
|||
item.labelText = datum.name
|
||||
item.libraryID = datum.id
|
||||
item.libraryType = datum.CollectionType
|
||||
item.data = datum
|
||||
end for
|
||||
end for
|
||||
return data
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
<component name="Library" extends="Scene">
|
||||
<children>
|
||||
<LibraryRow id="LibrarySelect" />
|
||||
<Overhang id="overhang" title="Libraries" />
|
||||
</children>
|
||||
</component>
|
||||
|
|
|
@ -4,5 +4,6 @@
|
|||
<field id="labelText" type="string" />
|
||||
<field id="libraryID" type="string" />
|
||||
<field id="libraryType" type="string" />
|
||||
<field id="data" type="associativearray" />
|
||||
</interface>
|
||||
</component>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<interface>
|
||||
<field id="rowSize" type="int" />
|
||||
<field id="movieData" type="associativearray" onChange="setData" />
|
||||
<field id="library" type="associativearray" />
|
||||
</interface>
|
||||
<script type="text/brightscript">
|
||||
<![CDATA[
|
||||
|
@ -10,7 +11,6 @@
|
|||
m.top.itemComponentName = "ListPoster"
|
||||
m.top.content = getData()
|
||||
|
||||
|
||||
m.top.rowFocusAnimationStyle = "floatingFocus"
|
||||
'm.top.vertFocusAnimationStyle = "floatingFocus"
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
dimensions = m.top.getScene().currentDesignResolution
|
||||
|
||||
border = 75
|
||||
m.top.translation = [border, border]
|
||||
m.top.translation = [border, border + 115]
|
||||
|
||||
textHeight = 50
|
||||
' Do we decide width by rowSize, or rowSize by width...
|
||||
|
|
|
@ -6,5 +6,9 @@
|
|||
id="MovieSelect"
|
||||
visible="true"
|
||||
/>
|
||||
<Overhang
|
||||
id="overhang"
|
||||
title="Movies"
|
||||
/>
|
||||
</children>
|
||||
</component>
|
||||
|
|
|
@ -5,5 +5,9 @@
|
|||
id="TVShowSelect"
|
||||
visible="true"
|
||||
/>
|
||||
<Overhang
|
||||
id="overhang"
|
||||
title="TV Shows"
|
||||
/>
|
||||
</children>
|
||||
</component>
|
||||
|
|
|
@ -100,9 +100,9 @@ sub ShowLibrarySelect()
|
|||
else if nodeEventQ(msg, "itemSelected")
|
||||
target = getMsgRowTarget(msg)
|
||||
if target.libraryType = "movies"
|
||||
ShowMovieOptions(target.libraryID)
|
||||
ShowMovieOptions(target.data)
|
||||
else if target.libraryType = "tvshows"
|
||||
ShowTVShowOptions(target.libraryID)
|
||||
ShowTVShowOptions(target.data)
|
||||
else
|
||||
print Substitute("Library type {0} is not yet implemented", target.libraryType)
|
||||
end if
|
||||
|
@ -110,7 +110,8 @@ sub ShowLibrarySelect()
|
|||
end while
|
||||
end sub
|
||||
|
||||
sub ShowMovieOptions(library_id)
|
||||
sub ShowMovieOptions(library)
|
||||
library_id = library.id
|
||||
port = CreateObject("roMessagePort")
|
||||
screen = CreateObject("roSGScreen")
|
||||
screen.setMessagePort(port)
|
||||
|
@ -118,9 +119,13 @@ sub ShowMovieOptions(library_id)
|
|||
|
||||
screen.show()
|
||||
|
||||
overhang = scene.findNode("overhang")
|
||||
overhang.title = library.name
|
||||
|
||||
themeScene(scene)
|
||||
|
||||
options = scene.findNode("MovieSelect")
|
||||
options.library = library
|
||||
page_size = 30
|
||||
page_num = 1
|
||||
options_list = ItemList(library_id, {"limit": page_size,
|
||||
|
@ -199,7 +204,8 @@ sub ShowMovieDetails(movie_id)
|
|||
end while
|
||||
end sub
|
||||
|
||||
sub ShowTVShowOptions(library_id)
|
||||
sub ShowTVShowOptions(library)
|
||||
library_id = library.ID
|
||||
port = CreateObject("roMessagePort")
|
||||
screen = CreateObject("roSGScreen")
|
||||
screen.setMessagePort(port)
|
||||
|
@ -207,6 +213,9 @@ sub ShowTVShowOptions(library_id)
|
|||
|
||||
screen.show()
|
||||
|
||||
overhang = scene.findNode("overhang")
|
||||
overhang.title = library.name
|
||||
|
||||
themeScene(scene)
|
||||
|
||||
options = scene.findNode("TVShowSelect")
|
||||
|
|
Loading…
Reference in New Issue
Block a user