mirror of https://github.com/espruino/BangleApps
mclockplus 0.03: Allow widgets to detect this is a clock
parent
f81032ac5b
commit
b21a2bcf84
|
@ -3533,7 +3533,7 @@
|
||||||
"id": "mclockplus",
|
"id": "mclockplus",
|
||||||
"name": "Morph Clock+",
|
"name": "Morph Clock+",
|
||||||
"shortName": "Morph Clock+",
|
"shortName": "Morph Clock+",
|
||||||
"version": "0.02",
|
"version": "0.03",
|
||||||
"description": "Morphing Clock with more readable seconds and date and additional stopwatch",
|
"description": "Morphing Clock with more readable seconds and date and additional stopwatch",
|
||||||
"icon": "mclockplus.png",
|
"icon": "mclockplus.png",
|
||||||
"type": "clock",
|
"type": "clock",
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
0.01: Created app
|
0.01: Created app
|
||||||
0.02: Use Bangle.setUI for button/launcher handling
|
0.02: Use Bangle.setUI for button/launcher handling
|
||||||
|
0.03: Allow widgets to detect this is a clock
|
||||||
|
|
|
@ -304,15 +304,14 @@ Bangle.on('lcdPower',function(on) {
|
||||||
});
|
});
|
||||||
|
|
||||||
g.clear();
|
g.clear();
|
||||||
|
// Show launcher when button pressed
|
||||||
|
Bangle.setUI("clock");
|
||||||
Bangle.loadWidgets();
|
Bangle.loadWidgets();
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
// Update time once a second
|
// Update time once a second
|
||||||
timeInterval = setInterval(showTime, 1000);
|
timeInterval = setInterval(showTime, 1000);
|
||||||
showTime();
|
showTime();
|
||||||
|
|
||||||
// Show launcher when button pressed
|
|
||||||
Bangle.setUI("clock");
|
|
||||||
|
|
||||||
// Start stopwatch when BTN3 is pressed
|
// Start stopwatch when BTN3 is pressed
|
||||||
setWatch(() => {swInterval=setInterval(stopWatch, 1000);stopWatch();}, BTN3, {repeat:false,edge:"falling"});
|
setWatch(() => {swInterval=setInterval(stopWatch, 1000);stopWatch();}, BTN3, {repeat:false,edge:"falling"});
|
||||||
B3 = 1; // BTN3 is bound to start the stopwatch
|
B3 = 1; // BTN3 is bound to start the stopwatch
|
||||||
|
|
Loading…
Reference in New Issue