fixed boolean in AppMessage bug, moved ticks
parent
4e298171ef
commit
9d7b3a945a
|
@ -24,10 +24,10 @@ Pebble.addEventListener('webviewclosed', function(e) {
|
||||||
colorm: parseInt(configData.colorm, 16),
|
colorm: parseInt(configData.colorm, 16),
|
||||||
colorh: parseInt(configData.colorh, 16),
|
colorh: parseInt(configData.colorh, 16),
|
||||||
colorp: parseInt(configData.colorp, 16),
|
colorp: parseInt(configData.colorp, 16),
|
||||||
shadows: configData.shadows === 'true',
|
shadows: 0+(configData.shadows === 'true'),
|
||||||
ticks: configData.ticks,
|
ticks: configData.ticks,
|
||||||
colort: parseInt(configData.colort, 16),
|
colort: parseInt(configData.colort, 16),
|
||||||
rectticks: configData.rectticks === 'true'
|
rectticks: 0+(configData.rectticks === 'true')
|
||||||
}, function() {
|
}, function() {
|
||||||
console.log('Send successful!');
|
console.log('Send successful!');
|
||||||
}, function() {
|
}, function() {
|
||||||
|
|
30
src/main.c
30
src/main.c
|
@ -87,7 +87,7 @@ static void inbox_received_handler(DictionaryIterator *iter, void *context) {
|
||||||
persist_write_int(KEY_PEG_COLOR, colorp);
|
persist_write_int(KEY_PEG_COLOR, colorp);
|
||||||
gcolorp = GColorFromHEX(colorp);
|
gcolorp = GColorFromHEX(colorp);
|
||||||
}
|
}
|
||||||
if(shadows_t && shadows_t->value->int32 > 0) {
|
if(shadows_t && shadows_t->value->int8 > 0) {
|
||||||
persist_write_bool(KEY_SHADOWS, true);
|
persist_write_bool(KEY_SHADOWS, true);
|
||||||
shadows = true;
|
shadows = true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -103,7 +103,7 @@ static void inbox_received_handler(DictionaryIterator *iter, void *context) {
|
||||||
persist_write_int(KEY_TICK_COLOR, colort);
|
persist_write_int(KEY_TICK_COLOR, colort);
|
||||||
gcolort = GColorFromHEX(colort);
|
gcolort = GColorFromHEX(colort);
|
||||||
}
|
}
|
||||||
if(rectticks_t && rectticks_t->value->int32 > 0) {
|
if(rectticks_t && rectticks_t->value->int8 > 0) {
|
||||||
persist_write_bool(KEY_RECT_TICKS, true);
|
persist_write_bool(KEY_RECT_TICKS, true);
|
||||||
rectticks = true;
|
rectticks = true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -220,24 +220,24 @@ static void update_proc(Layer *layer, GContext *ctx) {
|
||||||
#if defined(PBL_RECT)
|
#if defined(PBL_RECT)
|
||||||
if (rectticks) {
|
if (rectticks) {
|
||||||
int dist_v = 41;
|
int dist_v = 41;
|
||||||
int dist_h = 44;
|
int dist_h = 46;
|
||||||
switch (ticks) {
|
switch (ticks) {
|
||||||
case 12:
|
case 12:
|
||||||
graphics_fill_circle(ctx, GPoint((bounds.size.w/2)+dist_h, 4), TICK_RADIUS/2); // 1
|
graphics_fill_circle(ctx, GPoint((bounds.size.w/2)+dist_h-1, 4), TICK_RADIUS/2); // 1
|
||||||
graphics_fill_circle(ctx, GPoint((bounds.size.w/2)-dist_h, 4), TICK_RADIUS/2); // 11
|
graphics_fill_circle(ctx, GPoint((bounds.size.w/2)-dist_h-1, 4), TICK_RADIUS/2); // 11
|
||||||
graphics_fill_circle(ctx, GPoint((bounds.size.w/2)+dist_h, (bounds.size.h-5)), TICK_RADIUS/2); // 5
|
graphics_fill_circle(ctx, GPoint((bounds.size.w/2)+dist_h-1, (bounds.size.h-5)), TICK_RADIUS/2); // 5
|
||||||
graphics_fill_circle(ctx, GPoint((bounds.size.w/2)-dist_h, (bounds.size.h-5)), TICK_RADIUS/2); // 7
|
graphics_fill_circle(ctx, GPoint((bounds.size.w/2)-dist_h-1, (bounds.size.h-5)), TICK_RADIUS/2); // 7
|
||||||
graphics_fill_circle(ctx, GPoint((bounds.size.w-5), (bounds.size.h/2)-dist_v), TICK_RADIUS/2); // 2
|
graphics_fill_circle(ctx, GPoint((bounds.size.w-5), (bounds.size.h/2)-dist_v-1), TICK_RADIUS/2); // 2
|
||||||
graphics_fill_circle(ctx, GPoint((bounds.size.w-5), (bounds.size.h/2)+dist_v), TICK_RADIUS/2); // 4
|
graphics_fill_circle(ctx, GPoint((bounds.size.w-5), (bounds.size.h/2)+dist_v-1), TICK_RADIUS/2); // 4
|
||||||
graphics_fill_circle(ctx, GPoint(4, (bounds.size.h/2)-dist_v), TICK_RADIUS/2); // 10
|
graphics_fill_circle(ctx, GPoint(4, (bounds.size.h/2)-dist_v-1), TICK_RADIUS/2); // 10
|
||||||
graphics_fill_circle(ctx, GPoint(4, (bounds.size.h/2)+dist_v), TICK_RADIUS/2); // 8
|
graphics_fill_circle(ctx, GPoint(4, (bounds.size.h/2)+dist_v-1), TICK_RADIUS/2); // 8
|
||||||
case 4:
|
case 4:
|
||||||
graphics_fill_circle(ctx, GPoint((bounds.size.w/2), (bounds.size.h-3)), TICK_RADIUS); // 6
|
graphics_fill_circle(ctx, GPoint((bounds.size.w/2)-1, (bounds.size.h-3)), TICK_RADIUS); // 6
|
||||||
graphics_fill_circle(ctx, GPoint((bounds.size.w-3), (bounds.size.h/2)), TICK_RADIUS); // 3
|
graphics_fill_circle(ctx, GPoint((bounds.size.w-3), (bounds.size.h/2)-1), TICK_RADIUS); // 3
|
||||||
graphics_fill_circle(ctx, GPoint(2, (bounds.size.h/2)), TICK_RADIUS); // 9
|
graphics_fill_circle(ctx, GPoint(2, (bounds.size.h/2)-1), TICK_RADIUS); // 9
|
||||||
case 1:
|
case 1:
|
||||||
default:
|
default:
|
||||||
graphics_fill_circle(ctx, GPoint((bounds.size.w/2), 2), TICK_RADIUS); // 12
|
graphics_fill_circle(ctx, GPoint((bounds.size.w/2)-1, 2), TICK_RADIUS); // 12
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue