void morse_clock_load(Window *main_window) { s_window = main_window; s_window_layer = window_get_root_layer(main_window); GRect bounds = layer_get_bounds(s_window_layer); // Layer *first = add_marker(50,120,20,20); // Layer *second = add_marker(100,120,20,20); // layer_set_hidden(second, false); int size; if(show_seconds) { size = (bounds.size.w / 6); } else { size = (bounds.size.w / 4); } // s_test = create_position(size); // s_test.field = &s_time.seconds; s_hour_markers = create_position(size, 0); s_hour_markers.field = &s_time.hours; s_minute_markers = create_position(size, size*2); s_minute_markers.field = &s_time.minutes; s_second_markers = create_position(size, size*4); s_second_markers.field = &s_time.seconds; tick_timer_service_subscribe(SECOND_UNIT, tick_handler); }
void button::set_pos(int x, int y, int w, int h) { this->pos = create_position(x, y, w, h); }