Clock app tell clock widgets to hide #3

pull/2113/head
thyttan 2022-09-06 20:56:43 +02:00
parent 55e1a7e74f
commit 0d2093a134
21 changed files with 38 additions and 22 deletions

View File

@ -1,3 +1,4 @@
0.01: first release 0.01: first release
0.02: RAM efficient version of `fourTwentyTz.js` (as suggested by @gfwilliams). 0.02: RAM efficient version of `fourTwentyTz.js` (as suggested by @gfwilliams).
0.03: `mkFourTwentyTz.js` now handles new timezonedb.com CSV format 0.03: `mkFourTwentyTz.js` now handles new timezonedb.com CSV format
0.04: Tell clock widgets to hide.

View File

@ -33,6 +33,8 @@ function draw() {
// Clear the screen once, at startup // Clear the screen once, at startup
g.clear(); g.clear();
// Show launcher when middle button pressed
Bangle.setUI("clock");
// Load widgets // Load widgets
Bangle.loadWidgets(); Bangle.loadWidgets();
Bangle.drawWidgets(); Bangle.drawWidgets();
@ -47,5 +49,4 @@ Bangle.on('lcdPower',on=>{
drawTimeout = undefined; drawTimeout = undefined;
} }
}); });
// Show launcher when middle button pressed
Bangle.setUI("clock");

View File

@ -1,7 +1,7 @@
{ {
"id": "ftclock", "id": "ftclock",
"name": "Four Twenty Clock", "name": "Four Twenty Clock",
"version": "0.03", "version": "0.04",
"description": "A clock that tells when and where it's going to be 4:20 next", "description": "A clock that tells when and where it's going to be 4:20 next",
"icon": "app.png", "icon": "app.png",
"screenshots": [{"url":"screenshot.png"}, {"url":"screenshot1.png"}], "screenshots": [{"url":"screenshot.png"}, {"url":"screenshot1.png"}],

View File

@ -1,2 +1,3 @@
0.01: First released version 0.01: First released version
0.02: Changed setWatch to Bangle.setUI 0.02: Changed setWatch to Bangle.setUI
0.03: Tell clock widgets to hide.

View File

@ -238,10 +238,12 @@ Bangle.on('lcdPower', (on) => {
} }
}); });
// Show launcher when button pressed
Bangle.setUI("clock");
g.clear(); g.clear();
startTimers(); startTimers();
Bangle.loadWidgets(); Bangle.loadWidgets();
drawAll(); drawAll();
// Show launcher when button pressed
Bangle.setUI("clock");

View File

@ -2,7 +2,7 @@
"id": "gallifr", "id": "gallifr",
"name": "Time Traveller's Chronometer", "name": "Time Traveller's Chronometer",
"shortName": "Time Travel Clock", "shortName": "Time Travel Clock",
"version": "0.02", "version": "0.03",
"description": "A clock for time travellers. The light pie segment shows the minutes, the black circle, the hour. The dial itself reads 'time' just in case you forget.", "description": "A clock for time travellers. The light pie segment shows the minutes, the black circle, the hour. The dial itself reads 'time' just in case you forget.",
"icon": "gallifr.png", "icon": "gallifr.png",
"screenshots": [{"url":"screenshot_time.png"}], "screenshots": [{"url":"screenshot_time.png"}],

View File

@ -1,3 +1,4 @@
0.01: New App! 0.01: New App!
0.02: BTN2->launcher, use smaller text to allow "20:00" to fit on screen 0.02: BTN2->launcher, use smaller text to allow "20:00" to fit on screen
0.03: Changed setWatch to Bangle.setUI 0.03: Changed setWatch to Bangle.setUI
0.04: Tell clock widgets to hide.

View File

@ -142,11 +142,13 @@ Bangle.on('lcdPower',function(on) {
animInterval = setInterval(iterate, 50); animInterval = setInterval(iterate, 50);
} }
}); });
g.clear();
// Show launcher when button pressed
Bangle.setUI("clock");g.clear();
Bangle.loadWidgets(); Bangle.loadWidgets();
Bangle.drawWidgets(); Bangle.drawWidgets();
iterate(); iterate();
animInterval = setInterval(iterate, 50); animInterval = setInterval(iterate, 50);
// Show launcher when button pressed
Bangle.setUI("clock");

View File

@ -1,7 +1,7 @@
{ {
"id": "geissclk", "id": "geissclk",
"name": "Geiss Clock", "name": "Geiss Clock",
"version": "0.03", "version": "0.04",
"description": "7 segment clock with animated background in the style of Ryan Geiss' music visualisation. NOTE: The first run will take ~1 minute to do some precalculation", "description": "7 segment clock with animated background in the style of Ryan Geiss' music visualisation. NOTE: The first run will take ~1 minute to do some precalculation",
"icon": "clock.png", "icon": "clock.png",
"type": "clock", "type": "clock",

View File

@ -1,2 +1,3 @@
0.20: New App! 0.20: New App!
0.21: Tell clock widgets to hide.

View File

@ -178,6 +178,8 @@ function draw() {
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// Bangle.setBarometerPower(true); // Bangle.setBarometerPower(true);
Bangle.setUI("clock");
Bangle.loadWidgets(); Bangle.loadWidgets();
draw(); draw();
@ -197,6 +199,5 @@ Bangle.on('lcdPower', on => {
} }
}); });
Bangle.setUI("clock");
Bangle.drawWidgets(); Bangle.drawWidgets();

View File

@ -2,7 +2,7 @@
"id": "glbasic", "id": "glbasic",
"name": "GLBasic Clock", "name": "GLBasic Clock",
"shortName": "GLBasic", "shortName": "GLBasic",
"version": "0.20", "version": "0.21",
"description": "A clock with large numbers", "description": "A clock with large numbers",
"dependencies": {"widpedom":"app"}, "dependencies": {"widpedom":"app"},
"icon": "icon48.png", "icon": "icon48.png",

View File

@ -8,3 +8,4 @@
0.07: Don't cut off wide date formats 0.07: Don't cut off wide date formats
0.08: Use Bangle.setUI for button/launcher handling 0.08: Use Bangle.setUI for button/launcher handling
0.09: Bangle.js 2 compatibility 0.09: Bangle.js 2 compatibility
0.10: Tell clock widgets to hide.

View File

@ -72,6 +72,8 @@ g.drawImage(img, 0,OY,bgoptions);
// draw clock itself and do it every second // draw clock itself and do it every second
draw(); draw();
var secondInterval = setInterval(draw,1000); var secondInterval = setInterval(draw,1000);
// Show launcher when button pressed
Bangle.setUI("clock");
// load widgets // load widgets
Bangle.loadWidgets(); Bangle.loadWidgets();
Bangle.drawWidgets(); Bangle.drawWidgets();
@ -84,5 +86,4 @@ Bangle.on('lcdPower',on=>{
draw(); draw();
} }
}); });
// Show launcher when button pressed
Bangle.setUI("clock");

View File

@ -2,7 +2,7 @@
"id": "imgclock", "id": "imgclock",
"name": "Image background clock", "name": "Image background clock",
"shortName": "Image Clock", "shortName": "Image Clock",
"version": "0.09", "version": "0.10",
"description": "A clock with an image as a background", "description": "A clock with an image as a background",
"icon": "app.png", "icon": "app.png",
"type": "clock", "type": "clock",

View File

@ -3,3 +3,4 @@
0.03: Move to Bangle.setUI to launcher support 0.03: Move to Bangle.setUI to launcher support
0.04: Tweaks for compatibility with BangleJS2 0.04: Tweaks for compatibility with BangleJS2
0.05: Time-word now readable on Bangle.js 2 0.05: Time-word now readable on Bangle.js 2
0.06: Tell clock widgets to hide.

View File

@ -154,6 +154,9 @@ Bangle.on('lcdPower', function(on) {
if (on) drawWordClock(); if (on) drawWordClock();
}); });
// Show launcher when button pressed
Bangle.setUI("clock");
g.clear(); g.clear();
Bangle.loadWidgets(); Bangle.loadWidgets();
Bangle.drawWidgets(); Bangle.drawWidgets();
@ -172,5 +175,4 @@ Bangle.on('touch',e=>{
} }
}); });
// Show launcher when button pressed
Bangle.setUI("clock");

View File

@ -1,7 +1,7 @@
{ {
"id": "impwclock", "id": "impwclock",
"name": "Imprecise Word Clock", "name": "Imprecise Word Clock",
"version": "0.05", "version": "0.06",
"description": "Imprecise word clock for vacations, weekends, and those who never need accurate time.", "description": "Imprecise word clock for vacations, weekends, and those who never need accurate time.",
"icon": "clock-impword.png", "icon": "clock-impword.png",
"type": "clock", "type": "clock",

View File

@ -1,2 +1,3 @@
0.01: Created app based on digiclock with some small tweaks. 0.01: Created app based on digiclock with some small tweaks.
0.02: Swap to Bangle.setUI for launcher/buttons 0.02: Swap to Bangle.setUI for launcher/buttons
0.03: Tell clock widgets to hide.

View File

@ -89,8 +89,8 @@ Bangle.on('lcdPower',on=>{
} }
}); });
Bangle.loadWidgets();
Bangle.drawWidgets();
// Show launcher when button pressed // Show launcher when button pressed
Bangle.setUI("clock"); Bangle.setUI("clock");
Bangle.loadWidgets();
Bangle.drawWidgets();

View File

@ -2,7 +2,7 @@
"id": "isoclock", "id": "isoclock",
"name": "ISO Compliant Clock Face", "name": "ISO Compliant Clock Face",
"shortName": "ISO Clock", "shortName": "ISO Clock",
"version": "0.02", "version": "0.03",
"description": "Tweaked fork of digiclock for ISO date and time", "description": "Tweaked fork of digiclock for ISO date and time",
"icon": "isoclock.png", "icon": "isoclock.png",
"type": "clock", "type": "clock",