widget_utils for neonx

master
thyttan 2023-01-11 20:32:43 +01:00
parent 6bd6cdaa88
commit a50f8bf0f3
3 changed files with 6 additions and 4 deletions

View File

@ -2,4 +2,5 @@
0.02: Optional fullscreen mode
0.03: Optional show lock status via color
0.04: Ensure that widgets are always hidden in fullscreen mode
0.05: Better lock/unlock animation
0.05: Better lock/unlock animation
0.06: Use widget_utils.

View File

@ -2,7 +2,7 @@
"id": "neonx",
"name": "Neon X & IO X Clock",
"shortName": "Neon X Clock",
"version": "0.05",
"version": "0.06",
"description": "Pebble Neon X & Neon IO X for Bangle.js",
"icon": "neonx.png",
"type": "clock",

View File

@ -19,6 +19,7 @@ let saved_settings = require('Storage').readJSON('neonx.json', 1) || settings;
for (const key in saved_settings) {
settings[key] = saved_settings[key]
}
let widget_utils = require('widget_utils');
const digits = {
@ -133,7 +134,7 @@ function drawAnimated(){
function _draw(date, xc){
// Depending on the settings, we clear all widgets or draw those.
if(settings.fullscreen){
for (let wd of WIDGETS) {wd.draw=()=>{};wd.area="";}
widget_utils.hide();
} else {
Bangle.drawWidgets();
}
@ -210,4 +211,4 @@ g.clear(1);
Bangle.setUI("clock");
Bangle.loadWidgets();
draw();
draw();