BangleApps/apps/clockbg
Gordon Williams 43ec372519 add fallback so background still works even if settings broken 2024-04-22 10:11:58 +01:00
..
img Add 'clock backgrounds' app that other clocks can use to provide custom backgrounds - fix #3287 2024-04-04 12:59:18 +01:00
ChangeLog clockbg 0.02: Moved settings into 'Settings->Apps' 2024-04-19 15:26:13 +01:00
README.md Add 'clock backgrounds' app that other clocks can use to provide custom backgrounds - fix #3287 2024-04-04 12:59:18 +01:00
app.png Add 'clock backgrounds' app that other clocks can use to provide custom backgrounds - fix #3287 2024-04-04 12:59:18 +01:00
interface.html Add 'clock backgrounds' app that other clocks can use to provide custom backgrounds - fix #3287 2024-04-04 12:59:18 +01:00
lib.js add fallback so background still works even if settings broken 2024-04-22 10:11:58 +01:00
metadata.json clockbg 0.02: Moved settings into 'Settings->Apps' 2024-04-19 15:26:13 +01:00
screenshot.png Add 'clock backgrounds' app that other clocks can use to provide custom backgrounds - fix #3287 2024-04-04 12:59:18 +01:00
settings.js clockbg 0.02: Moved settings into 'Settings->Apps' 2024-04-19 15:26:13 +01:00

README.md

Clock Backgrounds

This app provides a library (clockbg) that can be used by clocks to provide different backgrounds for them.

Usage

By default the app provides just a red/green/blue background but it can easily be configured.

You can either:

  • Go to the Clock Backgrounds app in the App Loader and upload backgrounds
  • Go to the Backgrounds app on the Bangle itself, and choose between solid color, random colors, or any uploaded images.

Usage in code

Just use the following to use this library within your code:

// once at the start
let background = require("clockbg");

// to fill the whole area
background.fillRect(Bangle.appRect);

// to fill just one part of the screen
background.fillRect(x1, y1, x2, y2);

You should also add "dependencies" : { "clockbg":"module" }, to your app's metadata to ensure that the clock background library is automatically loaded.

Features to be added

This library/app is still pretty basic right now, but a few features could be added that would really improve functionality:

  • Support for >1 image, and choosing randomly between them
  • Support for gradients (random colors)
  • Storing 'clear' areas of uploaded images so clocks can easily position themselves