widget_utils for thering

pull/2492/head
thyttan 2023-01-11 20:15:13 +01:00
parent d0bd009178
commit 737a3738d4
3 changed files with 5 additions and 4 deletions

2
apps/thering/ChangeLog Normal file
View File

@ -0,0 +1,2 @@
0.01: Initial release.
0.02: Use widget_utils.

View File

@ -1,5 +1,6 @@
const h = g.getHeight(); const h = g.getHeight();
const w = g.getWidth(); const w = g.getWidth();
const widget_utils = require('widget_utils');
// palette for 0-40% // palette for 0-40%
const pal1 = new Uint16Array([g.theme.bg, g.toColor("#020"), g.toColor("#0f0"), g.toColor("#00f")]); const pal1 = new Uint16Array([g.theme.bg, g.toColor("#020"), g.toColor("#0f0"), g.toColor("#00f")]);
// palette for 50-100% // palette for 50-100%
@ -215,10 +216,8 @@ Bangle.setUI("clock");
Bangle.loadWidgets(); Bangle.loadWidgets();
/* /*
* we are not drawing the widgets as we are taking over the whole screen * we are not drawing the widgets as we are taking over the whole screen
* so we will blank out the draw() functions of each widget and change the
* area to the top bar doesn't get cleared.
*/ */
for (let wd of WIDGETS) {wd.draw=()=>{};wd.area="";} widget_utils.hide();
draw(); draw();
setInterval(draw, 60000); setInterval(draw, 60000);

View File

@ -1,6 +1,6 @@
{ "id": "thering", { "id": "thering",
"name": "The Ring", "name": "The Ring",
"version":"0.01", "version":"0.02",
"description": "A proof of concept clock with large ring guage for steps using pre-set images, acts as a tutorial piece for discussion", "description": "A proof of concept clock with large ring guage for steps using pre-set images, acts as a tutorial piece for discussion",
"icon": "app.png", "icon": "app.png",
"tags": "clock", "tags": "clock",