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