BangleApps/apps/setting
Richard de Boer 39621bfae0 Settings: Add support for app/widget settings
Apps and widgets can add a `<appid>.settings.js` file which can be
opened from the "App/widget settings" submenu.
This file should define a single function to configure the app/widget.
The function is passed a `back` argument, which can be used to return to
the settings menu by calling `back()`.

Example `<appid>.settings.js`:
```
function settings(back) {
  const mySettingsMenu = {
    '': { 'title': 'My Widget' },
    '< Back': back, // go back to settings menu
    'Sound': {
      value: false,
      format: s => s ? 'on' : 'off',
      onchange: s => {if(s) Bangle.beep()} // TODO: save new value
    },
  };
  E.showMenu(mySettingsMenu)
}
```
2020-04-03 01:46:43 +02:00
..
ChangeLog Settings: Add support for app/widget settings 2020-04-03 01:46:43 +02:00
settings-default.json Added vibrate as beep workaround 2020-03-25 11:05:33 +00:00
settings-icon.js 🚚 Move apps to subfolders #46 2019-11-17 23:43:58 +01:00
settings.js Settings: Add support for app/widget settings 2020-04-03 01:46:43 +02:00
settings.png 🚚 Move apps to subfolders #46 2019-11-17 23:43:58 +01:00