Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Create a new user setting screen to allow setting and storing preferences on the Roku Device on a per user basis.
Screen it accessible via the * button on the home screen for now, under the "Settings" option. A folder/item type view is displayed which is built from the
settings/settings.json
file, meaning new settings can easily be added without having to update the settings page.The
settings.json
is an array of configItem objects with the following propertiestitle
: Short title for display in Menu & Top of setting paneldescription
: Description of the settingsettingName
: Unique id to use when storing the setting in the registrytype
: Type of setting (e.g.bool
,number
,text
, etc)default
: Optional default value for settingchildren
: Array of configItem objects to appear under settingIt can be though of as a tree, with branches being the folders and the leaf nodes being the actual properties being set. For branches,
type
,default
andsettingName
would not be set, and for lead nodeschildren
would not be set.Currently only type of
bool
is supported. This should be easy to extend with other types as they are needed and validation can be added in.The
MPEG 2 Support
option has been moved into the new setting screen, and has also been moved from the application setting to a user setting (hence the migration code in theMain.brs
file.Once a new setting has been defined in the
settings.json
file, it can be accessed using the existingget_user_setting("key") method in config.brs file. They key is the
settingName` from the entry in settings.json.