Skip to content

Commit

Permalink
Clock app tell clock widgets to hide #3
Browse files Browse the repository at this point in the history
  • Loading branch information
thyttan committed Sep 6, 2022
1 parent 55e1a7e commit 0d2093a
Show file tree
Hide file tree
Showing 21 changed files with 38 additions and 22 deletions.
1 change: 1 addition & 0 deletions apps/ftclock/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
0.01: first release
0.02: RAM efficient version of `fourTwentyTz.js` (as suggested by @gfwilliams).
0.03: `mkFourTwentyTz.js` now handles new timezonedb.com CSV format
0.04: Tell clock widgets to hide.
5 changes: 3 additions & 2 deletions apps/ftclock/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ function draw() {

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

2 changes: 1 addition & 1 deletion apps/ftclock/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "ftclock",
"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",
"icon": "app.png",
"screenshots": [{"url":"screenshot.png"}, {"url":"screenshot1.png"}],
Expand Down
1 change: 1 addition & 0 deletions apps/gallifr/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
0.01: First released version
0.02: Changed setWatch to Bangle.setUI
0.03: Tell clock widgets to hide.
6 changes: 4 additions & 2 deletions apps/gallifr/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,12 @@ Bangle.on('lcdPower', (on) => {
}
});

// Show launcher when button pressed
Bangle.setUI("clock");

g.clear();
startTimers();
Bangle.loadWidgets();
drawAll();

// Show launcher when button pressed
Bangle.setUI("clock");

2 changes: 1 addition & 1 deletion apps/gallifr/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "gallifr",
"name": "Time Traveller's Chronometer",
"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.",
"icon": "gallifr.png",
"screenshots": [{"url":"screenshot_time.png"}],
Expand Down
1 change: 1 addition & 0 deletions apps/geissclk/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
0.01: New App!
0.02: BTN2->launcher, use smaller text to allow "20:00" to fit on screen
0.03: Changed setWatch to Bangle.setUI
0.04: Tell clock widgets to hide.
8 changes: 5 additions & 3 deletions apps/geissclk/clock.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,13 @@ Bangle.on('lcdPower',function(on) {
animInterval = setInterval(iterate, 50);
}
});
g.clear();

// Show launcher when button pressed
Bangle.setUI("clock");g.clear();

Bangle.loadWidgets();
Bangle.drawWidgets();
iterate();
animInterval = setInterval(iterate, 50);

// Show launcher when button pressed
Bangle.setUI("clock");

2 changes: 1 addition & 1 deletion apps/geissclk/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "geissclk",
"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",
"icon": "clock.png",
"type": "clock",
Expand Down
1 change: 1 addition & 0 deletions apps/glbasic/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
0.20: New App!
0.21: Tell clock widgets to hide.

3 changes: 2 additions & 1 deletion apps/glbasic/glbasic.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ function draw() {
////////////////////////////////////////////////////
// Bangle.setBarometerPower(true);

Bangle.setUI("clock");

Bangle.loadWidgets();
draw();

Expand All @@ -197,6 +199,5 @@ Bangle.on('lcdPower', on => {
}
});

Bangle.setUI("clock");

Bangle.drawWidgets();
2 changes: 1 addition & 1 deletion apps/glbasic/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "glbasic",
"name": "GLBasic Clock",
"shortName": "GLBasic",
"version": "0.20",
"version": "0.21",
"description": "A clock with large numbers",
"dependencies": {"widpedom":"app"},
"icon": "icon48.png",
Expand Down
1 change: 1 addition & 0 deletions apps/imgclock/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
0.07: Don't cut off wide date formats
0.08: Use Bangle.setUI for button/launcher handling
0.09: Bangle.js 2 compatibility
0.10: Tell clock widgets to hide.
5 changes: 3 additions & 2 deletions apps/imgclock/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ g.drawImage(img, 0,OY,bgoptions);
// draw clock itself and do it every second
draw();
var secondInterval = setInterval(draw,1000);
// Show launcher when button pressed
Bangle.setUI("clock");
// load widgets
Bangle.loadWidgets();
Bangle.drawWidgets();
Expand All @@ -84,5 +86,4 @@ Bangle.on('lcdPower',on=>{
draw();
}
});
// Show launcher when button pressed
Bangle.setUI("clock");

2 changes: 1 addition & 1 deletion apps/imgclock/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "imgclock",
"name": "Image background clock",
"shortName": "Image Clock",
"version": "0.09",
"version": "0.10",
"description": "A clock with an image as a background",
"icon": "app.png",
"type": "clock",
Expand Down
1 change: 1 addition & 0 deletions apps/impwclock/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
0.03: Move to Bangle.setUI to launcher support
0.04: Tweaks for compatibility with BangleJS2
0.05: Time-word now readable on Bangle.js 2
0.06: Tell clock widgets to hide.
6 changes: 4 additions & 2 deletions apps/impwclock/clock-impword.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ Bangle.on('lcdPower', function(on) {
if (on) drawWordClock();
});

// Show launcher when button pressed
Bangle.setUI("clock");

g.clear();
Bangle.loadWidgets();
Bangle.drawWidgets();
Expand All @@ -172,5 +175,4 @@ Bangle.on('touch',e=>{
}
});

// Show launcher when button pressed
Bangle.setUI("clock");

2 changes: 1 addition & 1 deletion apps/impwclock/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "impwclock",
"name": "Imprecise Word Clock",
"version": "0.05",
"version": "0.06",
"description": "Imprecise word clock for vacations, weekends, and those who never need accurate time.",
"icon": "clock-impword.png",
"type": "clock",
Expand Down
1 change: 1 addition & 0 deletions apps/isoclock/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
0.01: Created app based on digiclock with some small tweaks.
0.02: Swap to Bangle.setUI for launcher/buttons
0.03: Tell clock widgets to hide.
6 changes: 3 additions & 3 deletions apps/isoclock/isoclock.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ Bangle.on('lcdPower',on=>{
}
});

Bangle.loadWidgets();
Bangle.drawWidgets();

// Show launcher when button pressed
Bangle.setUI("clock");

Bangle.loadWidgets();
Bangle.drawWidgets();
2 changes: 1 addition & 1 deletion apps/isoclock/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "isoclock",
"name": "ISO Compliant Clock Face",
"shortName": "ISO Clock",
"version": "0.02",
"version": "0.03",
"description": "Tweaked fork of digiclock for ISO date and time",
"icon": "isoclock.png",
"type": "clock",
Expand Down

0 comments on commit 0d2093a

Please sign in to comment.