mirror of https://github.com/espruino/BangleApps
smclock: Fix battery font, update Changelog and screenshots
parent
7d03b49f0c
commit
9d4cb9081f
|
@ -1,5 +1,6 @@
|
||||||
0.01: Initial version
|
0.01: Initial version
|
||||||
0.02: Add battery level
|
0.02: Add battery level
|
||||||
0.03: Fix battery display when full
|
0.03: Fix battery display when full (incorporating code by Ronin0000)
|
||||||
0.04: Add support for settings
|
0.04: Add support for settings
|
||||||
0.05: Add ability to change background (3bit or 4bit)
|
0.05: Add ability to change background (3bit or 4bit)
|
||||||
|
0.06: Replace battery text with image
|
||||||
|
|
|
@ -114,12 +114,16 @@ function draw() {
|
||||||
g.setColor("#000").fillRect(x+2,y+2,x+12,y+22).clearRect(x+4,y+4,x+10,y+20).fillRect(x+5,y+1,x+9,y+2);
|
g.setColor("#000").fillRect(x+2,y+2,x+12,y+22).clearRect(x+4,y+4,x+10,y+20).fillRect(x+5,y+1,x+9,y+2);
|
||||||
g.setColor(batColor).fillRect(x+4,y+20-(batLevel*16/100),x+10,y+20);
|
g.setColor(batColor).fillRect(x+4,y+20-(batLevel*16/100),x+10,y+20);
|
||||||
}
|
}
|
||||||
g.setFont("Vector", 16);
|
|
||||||
if (Bangle.isCharging()) {
|
if (Bangle.isCharging()) {
|
||||||
g.setColor("#ff0");
|
g.setColor("#ff0");
|
||||||
} else {
|
} else {
|
||||||
g.setColor(batColor);
|
g.setColor(batColor);
|
||||||
}
|
}
|
||||||
|
if (useVectorFont == true) {
|
||||||
|
g.setFont("Vector", 16);
|
||||||
|
} else {
|
||||||
|
g.setFont("4x6", 3);
|
||||||
|
}
|
||||||
if (batLevel < 100) {
|
if (batLevel < 100) {
|
||||||
bat = d02(batLevel) + "%";
|
bat = d02(batLevel) + "%";
|
||||||
g.drawString(bat, 50, 22, false);
|
g.drawString(bat, 50, 22, false);
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.0 KiB |
Loading…
Reference in New Issue