mirror of
https://github.com/alinanorakari/Pebble-Watchface-Squared-1.0.git
synced 2026-01-15 09:25:22 +01:00
Flag for leading zeros
Added a boolean to switch on or off the "cyclers" that normally replace leading zeros in hour, day and month.
This commit is contained in:
BIN
squared_screen_eu.png
Normal file
BIN
squared_screen_eu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
squared_screen_eu_zero.png
Normal file
BIN
squared_screen_eu_zero.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
squared_screen_zero.png
Normal file
BIN
squared_screen_zero.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/.DS_Store
vendored
Normal file
BIN
src/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -11,7 +11,8 @@ PBL_APP_INFO(MY_UUID,
|
|||||||
|
|
||||||
Window window;
|
Window window;
|
||||||
|
|
||||||
#define US_DATE false // true == MM/DD, false == DD/MM
|
#define US_DATE true // true == MM/DD, false == DD/MM
|
||||||
|
#define NO_ZERO true // false == replaces leading Zero for hour, day, month with a "cycler"
|
||||||
#define TILE_SIZE 10
|
#define TILE_SIZE 10
|
||||||
#define NUMSLOTS 8
|
#define NUMSLOTS 8
|
||||||
#define SPACING_X TILE_SIZE
|
#define SPACING_X TILE_SIZE
|
||||||
@@ -251,22 +252,24 @@ void handle_tick(AppContextRef ctx, PebbleTickEvent *evt) {
|
|||||||
slot[7].curDigit = mo%10;
|
slot[7].curDigit = mo%10;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (slot[0].curDigit == 0) {
|
if (NO_ZERO) {
|
||||||
slot[0].curDigit = 10;
|
if (slot[0].curDigit == 0) {
|
||||||
if (slot[0].prevDigit == 10) {
|
slot[0].curDigit = 10;
|
||||||
slot[0].curDigit++;
|
if (slot[0].prevDigit == 10) {
|
||||||
|
slot[0].curDigit++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
if (slot[4].curDigit == 0) {
|
||||||
if (slot[4].curDigit == 0) {
|
slot[4].curDigit = 10;
|
||||||
slot[4].curDigit = 10;
|
if (slot[4].prevDigit == 10) {
|
||||||
if (slot[4].prevDigit == 10) {
|
slot[4].curDigit++;
|
||||||
slot[4].curDigit++;
|
}
|
||||||
}
|
}
|
||||||
}
|
if (slot[6].curDigit == 0) {
|
||||||
if (slot[6].curDigit == 0) {
|
slot[6].curDigit = 10;
|
||||||
slot[6].curDigit = 10;
|
if (slot[6].prevDigit == 10) {
|
||||||
if (slot[6].prevDigit == 10) {
|
slot[6].curDigit++;
|
||||||
slot[6].curDigit++;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
animation_schedule(&anim);
|
animation_schedule(&anim);
|
||||||
|
|||||||
Reference in New Issue
Block a user