Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Trying to fix font change crash
Browse files Browse the repository at this point in the history
  • Loading branch information
JumpMaster committed May 22, 2014
1 parent 4ff3b5b commit 095af56
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 43 deletions.
74 changes: 37 additions & 37 deletions appinfo.json
Original file line number Diff line number Diff line change
@@ -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"
}
12 changes: 6 additions & 6 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 095af56

Please sign in to comment.