Beispiel #1
0
// W: 144px H: 168px
static void main_window_load(Window *window) {

    Layer *window_layer = window_get_root_layer(window);
    window_set_background_color(s_main_window, GColorBlack);

    create_months_layer(window_layer);
    create_weekdays_layer(window_layer);
    create_date_layer(window_layer);
    create_time_layer(window_layer);
    create_second_time_layer(window_layer);
    create_battery_layer(window_layer);
    create_step_count_layer(window_layer);
    create_bluetooth_layer(window_layer);
    create_sleep_bar_layer(window_layer);
    create_deep_sleep_bar_layer(window_layer);
    create_sleep_meter_layer(window_layer);
}
Beispiel #2
0
// Load up the main window
static void main_window_load(Window *window) {
  load_fonts();
  create_time_layer();
  create_background_layer();
  create_weather_layer();
  create_date_layer();
  create_battery_layer();

  // Add each layer as a child layer to the Window's root layer
  layer_add_child(window_get_root_layer(window), bitmap_layer_get_layer(s_background_layer));
  layer_add_child(window_get_root_layer(window), text_layer_get_layer(s_hour_layer0));
  layer_add_child(window_get_root_layer(window), text_layer_get_layer(s_hour_layer1));
  layer_add_child(window_get_root_layer(window), text_layer_get_layer(s_min_layer0));
  layer_add_child(window_get_root_layer(window), text_layer_get_layer(s_min_layer1));
  layer_add_child(window_get_root_layer(window), text_layer_get_layer(s_colon_layer));
  layer_add_child(window_get_root_layer(window), text_layer_get_layer(s_temperature_layer));
  layer_add_child(window_get_root_layer(window), text_layer_get_layer(s_battery_layer));
  layer_add_child(window_get_root_layer(window), text_layer_get_layer(s_date_layer));
  layer_add_child(window_get_root_layer(window), text_layer_get_layer(s_battery_layer));
}