Closed
Description
I'm seeing quite a few clocks now that provide extra data on the watch face - like steps or weather. Often there may even be an existing clock that is then cloned to make it show that extra data - and then the clock's code is duplicated, as well as the code to show the data.
It'd be nice to:
- make the process of adding extra data to clock faces easier and more flexible
- reduce the code duplication
The idea of widgets was to display this kind of data, but right now they're relegated to a small 24px strip at the top and bottom of the screen.
We also have clock_info now which is a really neat system that allows a clock to display information that can be scrolled through (and added to with plugins): https://github.com/espruino/BangleApps/blob/master/modules/clock_info.js
I'm open to ideas here - just thinking aloud really, but:
- We have
tl,tr,bl,br
widget areas - we could have a new widget areaclk
or something, and then a library that allowed those widgets to be displayed wherever made sense on the clock face. Widgets would then need to look atthis.w
andthis.h
to figure out how much space they had available.- Downside is clock widgets would get loaded (and then ignored) when there wasn't a clock showing
- Maybe we have another library like
clock_info
that handles non-interactive clock widgets? - Or maybe these clocks should just use clock_info? It seems in many cases being able to swipe through different info would actually be a big improvement
- but then what if >1 type of info was to be displayed? Maybe we could allow a tap to select which one swipes on the screen would affect
- currently clock_info leaves user-interaction up to the app, but this could be part of the library too