diff --git a/components/options-data.xml b/components/options-data.xml new file mode 100644 index 00000000..fac91f14 --- /dev/null +++ b/components/options-data.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + diff --git a/components/options.xml b/components/options.xml index 20aabb22..167509cc 100644 --- a/components/options.xml +++ b/components/options.xml @@ -40,8 +40,7 @@ options = m.top.options row = m.top.findNode("fieldList") - row.removeChildren(row.getChildren(-1, 0)) - + row.clear() row.appendChildren(options) end sub @@ -52,6 +51,11 @@ m.top.visible = false m.top.escape = true return true + else if key = "OK" + list = m.top.findNode("panelList") + data = list.content.getChild(list.itemFocused) + data.callFunc("cycle") + return true end if return false diff --git a/source/ShowScenes.brs b/source/ShowScenes.brs index d4061f99..c75eba58 100644 --- a/source/ShowScenes.brs +++ b/source/ShowScenes.brs @@ -171,16 +171,24 @@ sub ShowMovieOptions(library) sidepanel = scene.findNode("options") movie_options = [ {"title": "Sort Field", + "base_title": "Sort Field", "key": "movie_sort_field", - "values": ["blah", "this", "that"]}, + "default": "DateCreated", + "values": ["DateCreated", "PremiereDate", "SortName"]}, {"title": "Sort Order", + "base_title": "Sort Order", "key": "movie_sort_order", - "values": ["blah", "this", "that"]} + "default": "Descending", + "values": ["Descending", "Ascending"]} ] new_options = [] for each opt in movie_options - o = CreateObject("roSGNode", "ContentNode") + o = CreateObject("roSGNode", "OptionsData") o.title = opt.title + o.choices = opt.values + o.base_title = opt.base_title + o.config_key = opt.key + o.value = get_user_setting(opt.key, opt.default) new_options.append([o]) end for sidepanel.options = new_options