void main_window_load(Window *window) { Layer *window_layer = window_get_root_layer(window); GRect window_bounds = layer_get_bounds(window_layer); window_set_background_color(window, GColorBlack ); LOCAL_action_bar = action_bar_layer_create(); for ( int loop = 0; loop < N_LAYERS; loop ++ ) { local_create_layer( window_layer, &window_bounds, loop ); } action_bar_layer_add_to_window(LOCAL_action_bar, window); // then add status bar LOCAL_status_bar = status_bar_layer_create(); int16_t width = layer_get_bounds(window_layer).size.w - ACTION_BAR_WIDTH; GRect frame = GRect(0, 0, width, STATUS_BAR_LAYER_HEIGHT); layer_set_frame(status_bar_layer_get_layer(LOCAL_status_bar), frame); layer_add_child(window_layer, status_bar_layer_get_layer(LOCAL_status_bar)); // Update all main_window_reload_config(); main_window_update_elapsed( time(NULL) ); }
void main_window_load(Window *window) { Layer *window_layer = window_get_root_layer(window); GRect window_bounds = layer_get_bounds(window_layer); LOCAL_time_start = time( NULL ); for ( int loop = 0; loop < 4; loop ++ ) local_create_layer( window_layer, &window_bounds, loop ); main_window_set_status( false ); main_window_text( 1, "HELLO", 5 ); }