1
0
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:
2013-04-30 03:28:48 +02:00
parent 6b71001b97
commit 97cf708e7c
5 changed files with 18 additions and 15 deletions

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

View File

@@ -11,7 +11,8 @@ PBL_APP_INFO(MY_UUID,
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 NUMSLOTS 8
#define SPACING_X TILE_SIZE
@@ -251,22 +252,24 @@ void handle_tick(AppContextRef ctx, PebbleTickEvent *evt) {
slot[7].curDigit = mo%10;
}
if (slot[0].curDigit == 0) {
slot[0].curDigit = 10;
if (slot[0].prevDigit == 10) {
slot[0].curDigit++;
if (NO_ZERO) {
if (slot[0].curDigit == 0) {
slot[0].curDigit = 10;
if (slot[0].prevDigit == 10) {
slot[0].curDigit++;
}
}
}
if (slot[4].curDigit == 0) {
slot[4].curDigit = 10;
if (slot[4].prevDigit == 10) {
slot[4].curDigit++;
if (slot[4].curDigit == 0) {
slot[4].curDigit = 10;
if (slot[4].prevDigit == 10) {
slot[4].curDigit++;
}
}
}
if (slot[6].curDigit == 0) {
slot[6].curDigit = 10;
if (slot[6].prevDigit == 10) {
slot[6].curDigit++;
if (slot[6].curDigit == 0) {
slot[6].curDigit = 10;
if (slot[6].prevDigit == 10) {
slot[6].curDigit++;
}
}
}
animation_schedule(&anim);