Clock apps tell clock widgets to hide #5

pull/2113/head
thyttan 2022-09-07 00:41:09 +02:00
parent 3c291b12a5
commit 4097f19d4e
22 changed files with 34 additions and 23 deletions

View File

@ -1 +1,2 @@
0.01: first release 0.01: first release
0.02: Tell clock widgets to hide.

View File

@ -10,6 +10,8 @@
* *
*/ */
Bangle.setUI('clock');
g.clear(); g.clear();
const SETTINGS_FILE = "limelight.json"; const SETTINGS_FILE = "limelight.json";
@ -259,5 +261,4 @@ Bangle.on('lcdPower',on=>{
} }
}); });
Bangle.setUI('clock');
draw(); draw();

View File

@ -1,7 +1,7 @@
{ {
"id": "limelight", "id": "limelight",
"name": "Limelight", "name": "Limelight",
"version": "0.01", "version": "0.02",
"description": "Simple analogue clock (with configurable fonts) based on the work of @Andreas_Rozek (Simple_Clock)", "description": "Simple analogue clock (with configurable fonts) based on the work of @Andreas_Rozek (Simple_Clock)",
"icon": "limelight.png", "icon": "limelight.png",
"readme":"README.md", "readme":"README.md",

View File

@ -2,3 +2,4 @@
0.02: New icon, shimmied date right a bit 0.02: New icon, shimmied date right a bit
0.03: Incorporated improvements from Peer David for accuracy, fix dark mode, widgets run in background 0.03: Incorporated improvements from Peer David for accuracy, fix dark mode, widgets run in background
0.04: Changed clock to use 12/24 hour format based on locale 0.04: Changed clock to use 12/24 hour format based on locale
0.05: Tell clock widgets to hide.

View File

@ -57,8 +57,8 @@ Bangle.on('lcdPower',on=>{
} }
}); });
Bangle.setUI("clock");
// Load widgets but hide them // Load widgets but hide them
Bangle.loadWidgets(); Bangle.loadWidgets();
draw(); draw();
Bangle.setUI("clock");

View File

@ -2,7 +2,7 @@
"name": "MacWatch2", "name": "MacWatch2",
"shortName":"MacWatch2", "shortName":"MacWatch2",
"icon": "app.png", "icon": "app.png",
"version":"0.04", "version":"0.05",
"description": "Classic Mac Finder clock", "description": "Classic Mac Finder clock",
"type": "clock", "type": "clock",
"tags": "clock", "tags": "clock",

View File

@ -5,3 +5,4 @@
Fix issue where first digit could get stuck going from "2x:xx" to " x:xx" (fix #365) Fix issue where first digit could get stuck going from "2x:xx" to " x:xx" (fix #365)
0.06: Support 12 hour time 0.06: Support 12 hour time
0.07: Use Bangle.setUI for button/launcher handling 0.07: Use Bangle.setUI for button/launcher handling
0.08: Tell clock widgets to hide.

View File

@ -209,6 +209,9 @@ Bangle.on('lcdPower',function(on) {
} }
}); });
// Show launcher when button pressed
Bangle.setUI("clock");
g.clear(); g.clear();
Bangle.loadWidgets(); Bangle.loadWidgets();
Bangle.drawWidgets(); Bangle.drawWidgets();
@ -216,5 +219,3 @@ Bangle.drawWidgets();
timeInterval = setInterval(showTime, 1000); timeInterval = setInterval(showTime, 1000);
showTime(); showTime();
// Show launcher when button pressed
Bangle.setUI("clock");

View File

@ -1,7 +1,7 @@
{ {
"id": "mclock", "id": "mclock",
"name": "Morphing Clock", "name": "Morphing Clock",
"version": "0.07", "version": "0.08",
"description": "7 segment clock that morphs between minutes and hours", "description": "7 segment clock that morphs between minutes and hours",
"icon": "clock-morphing.png", "icon": "clock-morphing.png",
"type": "clock", "type": "clock",

View File

@ -3,6 +3,7 @@
let outerRadius = Math.min(CenterX,CenterY) * 0.9; let outerRadius = Math.min(CenterX,CenterY) * 0.9;
Bangle.setUI('clock');
Bangle.loadWidgets(); Bangle.loadWidgets();
/**** updateClockFaceSize ****/ /**** updateClockFaceSize ****/
@ -225,6 +226,5 @@
} }
}); });
Bangle.setUI('clock');
Bangle.loadWidgets(); Bangle.loadWidgets();

View File

@ -1,2 +1,3 @@
1.00: First published version. 1.00: First published version.
1.01: Use Bangle.setUI for Launcher/buttons 1.01: Use Bangle.setUI for Launcher/buttons
1.02: Tell clock widgets to hide.

View File

@ -1,7 +1,7 @@
{ {
"id": "mysticclock", "id": "mysticclock",
"name": "Mystic Clock", "name": "Mystic Clock",
"version": "1.01", "version": "1.02",
"description": "A retro-inspired watchface featuring time, date, and an interactive data display line.", "description": "A retro-inspired watchface featuring time, date, and an interactive data display line.",
"icon": "mystic-clock.png", "icon": "mystic-clock.png",
"type": "clock", "type": "clock",

View File

@ -189,6 +189,13 @@ Bangle.on('touch', (button) => {
if (button === 3 && Bangle.isLCDOn()) Bangle.setLCDPower(false); if (button === 3 && Bangle.isLCDOn()) Bangle.setLCDPower(false);
}); });
// Show launcher when button pressed
Bangle.setUI("clockupdown", btn=>{
if (btn<0) prevInfo();
if (btn>0) nextInfo();
drawAll();
});
// clean app screen // clean app screen
g.clear(); g.clear();
Bangle.loadWidgets(); Bangle.loadWidgets();
@ -200,9 +207,3 @@ if (Bangle.isLCDOn()) {
drawAll(); // draw immediately drawAll(); // draw immediately
} }
// Show launcher when button pressed
Bangle.setUI("clockupdown", btn=>{
if (btn<0) prevInfo();
if (btn>0) nextInfo();
drawAll();
});

View File

@ -1,2 +1,3 @@
0.01: A copy of the analogimgclk to work for NodeConf Remote 0.01: A copy of the analogimgclk to work for NodeConf Remote
0.02: Use Bangle.setUI for button/launcher handling 0.02: Use Bangle.setUI for button/launcher handling
0.03: Tell clock widgets to hide.

View File

@ -120,10 +120,10 @@ Bangle.on('lcdPower', (on) => {
} }
}); });
// Show launcher when button pressed
Bangle.setUI("clock");
g.clear(); g.clear();
Bangle.loadWidgets(); Bangle.loadWidgets();
Bangle.drawWidgets(); Bangle.drawWidgets();
drawHands(true); drawHands(true);
// Show launcher when button pressed
Bangle.setUI("clock");

View File

@ -2,7 +2,7 @@
"id": "ncrclk", "id": "ncrclk",
"name": "NCR Clock", "name": "NCR Clock",
"shortName": "NCR Clock", "shortName": "NCR Clock",
"version": "0.02", "version": "0.03",
"description": "NodeConf Remote clock", "description": "NodeConf Remote clock",
"icon": "app.png", "icon": "app.png",
"type": "clock", "type": "clock",

View File

@ -1,2 +1,3 @@
... ...
0.10: First update with ChangeLog Added 0.10: First update with ChangeLog Added
0.11: Tell clock widgets to hide.

View File

@ -249,13 +249,13 @@ var open = false;
var timemode = true; var timemode = true;
var clockmode; var clockmode;
var novaYPos = -7; var novaYPos = -7;
Bangle.setUI("clock");
g.clear(); g.clear();
Bangle.loadWidgets(); Bangle.loadWidgets();
Bangle.drawWidgets(); Bangle.drawWidgets();
g.drawImage(nova(), -10, -10, { g.drawImage(nova(), -10, -10, {
scale: 2.2 scale: 2.2
}); });
Bangle.setUI("clock");
g.drawImage(star(), 5, -5, {scale:0.8}); g.drawImage(star(), 5, -5, {scale:0.8});
g.drawImage(star(), -10, 120, {scale:0.8}); g.drawImage(star(), -10, 120, {scale:0.8});

View File

@ -3,7 +3,7 @@
"shortName":"Nova Clock", "shortName":"Nova Clock",
"icon": "app.png", "icon": "app.png",
"type": "clock", "type": "clock",
"version":"0.10", "version":"0.11",
"description": "A clock inspired by the Kirby series", "description": "A clock inspired by the Kirby series",
"tags": "clock", "tags": "clock",
"supports": ["BANGLEJS2"], "supports": ["BANGLEJS2"],

View File

@ -8,3 +8,4 @@
0.08: Add theme options and optional lock symbol 0.08: Add theme options and optional lock symbol
0.09: Add support for internationalization (LANG placeholders + "locale" module) 0.09: Add support for internationalization (LANG placeholders + "locale" module)
Get steps from built-in step counter (widpedom no more needed, fix #1697) Get steps from built-in step counter (widpedom no more needed, fix #1697)
0.10: Tell clock widgets to hide.

View File

@ -2,7 +2,7 @@
"id": "pebble", "id": "pebble",
"name": "Pebble Clock", "name": "Pebble Clock",
"shortName": "Pebble", "shortName": "Pebble",
"version": "0.09", "version": "0.10",
"description": "A pebble style clock to keep the rebellion going", "description": "A pebble style clock to keep the rebellion going",
"readme": "README.md", "readme": "README.md",
"icon": "pebble.png", "icon": "pebble.png",

View File

@ -133,6 +133,8 @@ Bangle.on('lock', function(on) {
drawLock(); drawLock();
}); });
Bangle.setUI("clock");
g.clear(); g.clear();
Bangle.loadWidgets(); Bangle.loadWidgets();
@ -149,4 +151,3 @@ loadThemeColors();
setInterval(draw, 15000); // refresh every 15s setInterval(draw, 15000); // refresh every 15s
draw(); draw();
Bangle.setUI("clock");