commit bdd1715efc48ce0309df27181de0d31578f032f3
parent 106432f8cd0625b13ebded5574e13d4bba182527
Author: Brian C. Lane <bcl@brianlane.com>
Date: Sat, 30 Oct 2010 08:37:46 -0700
Added setup to directory listings
Diffstat:
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/HMS/source/appDisplayDirectory.brs b/HMS/source/appDisplayDirectory.brs
@@ -115,6 +115,13 @@ Function showCategories( screen As Object, files As Object, dir as Object, url a
hdImageTypes.Push("-HD.png")
list = CreateObject("roArray", files.Count(), true)
+ o = CreateObject("roAssociativeArray")
+ o.ContentType = "episode"
+ o.ShortDescriptionLine1 = "Setup"
+ o.SDPosterURL = "pkg://setup-SD.png"
+ o.HDPosterURL = "pkg://setup-HD.png"
+ list.Push(o)
+
for each f in files
print f[0]
@@ -143,6 +150,7 @@ Function showCategories( screen As Object, files As Object, dir as Object, url a
end for
screen.SetContentList(list)
+ screen.SetFocusedListItem(1)
screen.Show()
while true
@@ -153,8 +161,12 @@ Function showCategories( screen As Object, files As Object, dir as Object, url a
print "screen closed"
return invalid
else if msg.isListItemSelected() then
- print "msg: ";msg.GetMessage();" idx: ";msg.GetIndex()
- return files[msg.GetIndex()]
+ if msg.GetIndex() = 0 then
+ checkServerUrl(true)
+ else
+ print "msg: ";msg.GetMessage();" idx: ";msg.GetIndex()
+ return files[msg.GetIndex()-1]
+ end if
end if
end while
End Function
diff --git a/HMS/source/appMain.brs b/HMS/source/appMain.brs
@@ -6,18 +6,18 @@ Sub Main()
'initialize theme attributes like titles, logos and overhang color
initTheme()
- if not checkServerUrl(false) then
- ' Need to show an error to the user here and exit when they click done
- print "Server URL is invalid"
- return
- endif
-
screen = PreShowPosterScreen()
if screen = invalid then
print "Error creating initial poster screen"
return
end if
+ if not checkServerUrl(false) then
+ ' Need to show an error to the user here and exit when they click done
+ print "Server URL is invalid"
+ return
+ endif
+
path = []
done = false