From 095af56e74d30264e4d8a9aa0ca2a00587f04b2f Mon Sep 17 00:00:00 2001 From: JumpMaster Date: Thu, 22 May 2014 11:41:28 -0700 Subject: [PATCH] Trying to fix font change crash --- appinfo.json | 74 ++++++++++++++++++++++++++-------------------------- src/main.c | 12 ++++----- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/appinfo.json b/appinfo.json index b9695db..4bd1563 100644 --- a/appinfo.json +++ b/appinfo.json @@ -1,82 +1,82 @@ { - "versionLabel": "1.4", - "capabilities": [ - "configurable" - ], - "shortName": "PebbleAuth", - "longName": "PebbleAuth", - "versionCode": 5, - "uuid": "1f4d9835-3b9a-4ddd-907e-41a25d06f19c", "resources": { "media": [ { - "type": "png", - "file": "images/auth_icon.png", + "name": "IMAGE_ICON", "menuIcon": true, - "name": "IMAGE_ICON" + "type": "png", + "file": "images/auth_icon.png" }, { + "name": "FONT_BITWISE_32", "type": "font", - "file": "fonts/BITWISE_32.ttf", - "name": "FONT_BITWISE_32" + "file": "fonts/BITWISE_32.ttf" }, { + "name": "FONT_ORBITRON_28", "type": "font", - "file": "fonts/ORBITRON_28.ttf", - "name": "FONT_ORBITRON_28" + "file": "fonts/ORBITRON_28.ttf" }, { + "name": "IMAGE_ICON_NO", "type": "png", - "file": "images/No.png", - "name": "IMAGE_ICON_NO" + "file": "images/No.png" }, { + "name": "IMAGE_ICON_YES", "type": "png", - "file": "images/Yes.png", - "name": "IMAGE_ICON_YES" + "file": "images/Yes.png" }, { + "name": "FONT_UNISPACE_20", "type": "font", - "file": "fonts/UNISPACE_20.ttf", - "name": "FONT_UNISPACE_20" + "file": "fonts/UNISPACE_20.ttf" }, { + "name": "FONT_DIGITAL_28", "type": "font", - "file": "fonts/ANDROID_24.ttf", - "name": "FONT_DIGITAL_28" + "file": "fonts/ANDROID_24.ttf" }, { - "type": "font", - "file": "fonts/ANDROID_24.ttf", + "name": "FONT_DIGITAL_38", "characterRegex": "[0-9]", - "name": "FONT_DIGITAL_38" + "type": "font", + "file": "fonts/ANDROID_24.ttf" }, { + "name": "FONT_BD_CARTOON_20", "type": "font", - "file": "fonts/BD_Cartoon_Shout.ttf", - "name": "FONT_BD_CARTOON_20" + "file": "fonts/BD_Cartoon_Shout.ttf" }, { - "type": "font", - "file": "fonts/BD_Cartoon_Shout.ttf", + "name": "FONT_BD_CARTOON_28", "characterRegex": "[0-9]", - "name": "FONT_BD_CARTOON_28" + "type": "font", + "file": "fonts/BD_Cartoon_Shout.ttf" } ] }, + "companyName": "JumpMaster", + "shortName": "PebbleAuth", + "uuid": "1f4d9835-3b9a-4ddd-907e-41a25d06f19c", + "versionCode": 5, + "capabilities": [ + "configurable" + ], + "longName": "PebbleAuth", "watchapp": { "watchface": false }, "appKeys": { - "key_count": 0, - "font_style": 7, - "transmit_key": 2, - "timezone": 3, "delete_all": 8, - "delete_key": 6, + "timezone": 3, + "font_style": 7, "show_message": 4, + "delete_key": 6, + "transmit_key": 2, "request_key": 1, + "key_count": 0, "theme": 5 }, - "companyName": "JumpMaster" + "versionLabel": "1.4" } diff --git a/src/main.c b/src/main.c index a466ddb..b50db47 100644 --- a/src/main.c +++ b/src/main.c @@ -240,7 +240,7 @@ void finish_refreshing() { if (watch_otp_count) strcpy(label_text, otp_labels[otp_selected]); else - strcpy(label_text, "NO"); + strcpy(label_text, "TEST"); if (fonts_changed) set_fonts(); @@ -270,7 +270,7 @@ void finish_refreshing() { if (watch_otp_count) strcpy(pin_text, generateCode(otp_keys[otp_selected], timezone_offset)); else - strcpy(pin_text, "SECRETS"); + strcpy(pin_text, "123456"); otp_updated_at_tick = otp_update_tick; @@ -320,10 +320,10 @@ static void handle_second_tick(struct tm *tick_time, TimeUnits units_changed) { finish.size.w = finish.size.w * boxpercent; -// if (seconds % 30 == 0) -// animate_layer(text_layer_get_layer(countdown_layer), AnimationCurveEaseInOut, &start, &finish, 900, false); -// else -// animate_layer(text_layer_get_layer(countdown_layer), AnimationCurveLinear, &start, &finish, 900, false); + if (seconds % 30 == 0) + animate_layer(text_layer_get_layer(countdown_layer), AnimationCurveEaseInOut, &start, &finish, 900, false); + else + animate_layer(text_layer_get_layer(countdown_layer), AnimationCurveLinear, &start, &finish, 900, false); } void up_single_click_handler(ClickRecognizerRef recognizer, void *context) {