forked from FOSS/BangleApps
final release fixes
parent
33763110cc
commit
4e331e58cf
|
@ -2684,7 +2684,7 @@
|
|||
"id": "multiclock",
|
||||
"name": "Multi Clock",
|
||||
"version": "0.07",
|
||||
"description": "Clock with multiple faces - Big, Analogue, Digital, Text, Time-Date.\n Switch between faces with BTN1 & BTN3",
|
||||
"description": "Clock with multiple faces. Switch between faces with BTN1 & BTN3 or swipe left-right. For best display set theme Background 2 to cyan or some other bright colour in settings.",
|
||||
"icon": "multiclock.png",
|
||||
"type": "clock",
|
||||
"tags": "clock",
|
||||
|
|
|
@ -1,29 +1,11 @@
|
|||
# Multiclock
|
||||
|
||||
This is a clock app that supports multiple clock faces. The user can switch between faces while retaining widget state which makes the switch fast. Currently there are four clock faces as shown below.
|
||||
This is a clock app that supports multiple clock faces. The user can switch between faces while retaining widget state which makes the switch fast. Currently there are four clock faces as shown below. There are currently an anlog, digital, text, big digit, time and date, and a clone of the Nifty-A-Clock faces.
|
||||
### Analog Clock Face
|
||||
|
||||
|
||||
### Digital Clock Face
|
||||
|
||||
|
||||
### Big Digit Clock Face
|
||||
|
||||
|
||||
### Text Clock Face
|
||||
|
||||
|
||||
### Time and Date Clock Face
|
||||
|
||||
|
||||
## Controls
|
||||
Clock faces are kept in a circular list.
|
||||
|
||||
*BTN1* - switches to the next clock face.
|
||||
|
||||
*BTN2* - switches to the app launcher.
|
||||
|
||||
*BTN3* - switches to the previous clock face.
|
||||
Swipe left and right on both the Bangle and Bangle 2 switch between faces. BTN1 & BTH3 also switch faces on the Bangle.
|
||||
|
||||
## Adding a new face
|
||||
Clock faces are described in javascript storage files named `name.face.js`. For example, the Analog Clock Face is described in `ana.face.js`. These files have the following structure:
|
||||
|
@ -37,7 +19,7 @@ Clock faces are described in javascript storage files named `name.face.js`. For
|
|||
function drawAll(){
|
||||
//draw background + initial state of digits, hands etc
|
||||
}
|
||||
return {init:drawAll, tick:onSecond};
|
||||
return {init:drawAll, tick:onSecond, tickpersec:true};
|
||||
}
|
||||
return getFace;
|
||||
})();
|
||||
|
@ -46,6 +28,5 @@ For those familiar with the structure of widgets, this is similar, however, ther
|
|||
|
||||
The app at start up loads all files `*.face.js`. The simplest way of adding a face is thus to load it into `Storage` using the WebIDE. Similarly, to remove an unwanted face, simply delete it from `Storage` using the WebIDE.
|
||||
|
||||
## Support
|
||||
If `tickpersec` is false then `tick` is only called each minute as this is more power effcient - especially on the BAngle 2.
|
||||
|
||||
Please report bugs etc. by raising an issue [here](https://github.com/jeffmer/JeffsBangleAppsDev).
|
|
@ -9,7 +9,7 @@ function getFace(){
|
|||
var buf = Graphics.createArrayBuffer(W,92,1,{msb:true});
|
||||
function flip() {
|
||||
g.setColor(g.theme.fg);
|
||||
g.drawImage({width:buf.getWidth(),height:buf.getHeight(),buffer:buf.buffer},0,H/2-46);
|
||||
g.drawImage({width:buf.getWidth(),height:buf.getHeight(),buffer:buf.buffer},0,H/2-34);
|
||||
}
|
||||
|
||||
var W = g.getWidth();
|
||||
|
@ -24,10 +24,10 @@ function getFace(){
|
|||
buf.setFont("Vector",54*scale);
|
||||
buf.setFontAlign(0,-1);
|
||||
buf.drawString(time,W/2,0);
|
||||
buf.setFont("6x8",2);
|
||||
buf.setFont("6x8",scale<1?1:2);
|
||||
buf.setFontAlign(0,-1);
|
||||
var date = d.toString().substr(0,15);
|
||||
buf.drawString(date, W/2, 70);
|
||||
buf.drawString(date, W/2, 70*scale);
|
||||
flip();
|
||||
}
|
||||
return {init:drawTime, tick:drawTime, tickpersec:true};
|
||||
|
|
|
@ -23,17 +23,17 @@
|
|||
var d = new Date();
|
||||
g.setColor(g.theme.fg);
|
||||
g.setFontAlign(0,0);
|
||||
g.setFont("Vector",44);
|
||||
g.setFont("Vector",F);
|
||||
var txt = convert(d.getHours());
|
||||
g.setColor(g.theme.fg);
|
||||
g.drawString(txt.top,W/2,H/2-2*F);
|
||||
g.drawString(txt.top,W/2,H/2+24-2*F);
|
||||
g.setColor(g.theme.fg2);
|
||||
g.drawString(txt.bot,W/2,H/2-F);
|
||||
g.drawString(txt.bot,W/2,H/2+24-F);
|
||||
txt = convert(d.getMinutes());
|
||||
g.setColor(g.theme.fg);
|
||||
g.drawString(txt.top,W/2,H/2);
|
||||
g.drawString(txt.top,W/2,H/2+24);
|
||||
g.setColor(g.theme.fg2);
|
||||
g.drawString(txt.bot,W/2,H/2+F);
|
||||
g.drawString(txt.bot,W/2,H/2+24+F);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue