Beispiel #1
0
static void bluetooth_text_layer_create(Window *window){
  // Create time TextLayer
  s_bluetooth_layer = text_layer_create(GRect(124,0,20,18));
  text_layer_setup(window, s_bluetooth_layer);
  
  // Create GFont
  s_status_font = fonts_load_custom_font(resource_get_handle(RESOURCE_ID_FONT_SQUARE_16));
  // Apply to TextLayer
  text_layer_set_font(s_bluetooth_layer, s_status_font);
}
Beispiel #2
0
static void den_text_layer_create(Window *window){
  // Create time TextLayer
  s_den_layer = text_layer_create(GRect(78,85,72,35));
  text_layer_setup(window, s_den_layer);
  
  // Create GFont
  s_minute_font = fonts_load_custom_font(resource_get_handle(RESOURCE_ID_FONT_SQUARE_32));
  // Apply to TextLayer
  text_layer_set_font(s_den_layer, s_minute_font);
}
Beispiel #3
0
static void hour_text_layer_create(Window *window){
  // Create time TextLayer
  s_hour_layer = text_layer_create(GRect(5,45,72,60));
  text_layer_setup(window, s_hour_layer);
  
  // Create GFont
  s_hour_font = fonts_load_custom_font(resource_get_handle(RESOURCE_ID_FONT_SQUARE_60));
  // Apply to TextLayer
  text_layer_set_font(s_hour_layer, s_hour_font);
}
Beispiel #4
0
static void day_text_layer_create(Window *window){
  s_day_layer = text_layer_create(GRect(5,150,50,18));
  text_layer_setup(window, s_day_layer);
  
  // Create GFont
  s_status_font = fonts_load_custom_font(resource_get_handle(RESOURCE_ID_FONT_SQUARE_16));
  // Apply to TextLayer
  text_layer_set_font(s_day_layer, s_status_font);
  
  text_layer_set_text_alignment(s_day_layer, GTextAlignmentLeft);
}
static void word_layer_init(int which) {
	const word_t * const w = &words[which];

	GRect frame = GRect(
		w->col*FONT_W,
		w->row*FONT_H - 2,
		strlen(w->text_on)*(FONT_W+4),
		FONT_H+8
	);

	text_layer_setup(window, which, frame, font_off);
	word_mark(which, 0); // all are "off" initially
}
static void window_load(Window *window) {
  Layer *window_layer = window_get_root_layer(window);
  //GRect bounds = layer_get_bounds(window_layer);
  GRect logo_offset = GRect(4, 4, 119, 119);

  bl_logo = bitmap_layer_create(logo_offset);
  //bitmap_layer_set_alignment(bl_logo, GAlignTopLeft);
  bitmap_layer_set_bitmap(bl_logo, gbitmap_create_with_resource(RESOURCE_ID_LOGO));

  layer_add_child(window_layer, bitmap_layer_get_layer(bl_logo));

  action_bar_setup(window);
  text_layer_setup(window, window_layer);
}
static void
text_layer(
	word_t * word,
	GRect frame,
	GFont font
)
{
	text_layer_setup(&window, &word->layer, frame, font);

	GRect frame_right = frame;
	frame_right.origin.x = 150;

	property_animation_init_layer_frame(
		&word->anim,
		&word->layer.layer,
		&frame_right,
		&frame
	);

	animation_set_duration(&word->anim.animation, 500);
	animation_set_curve(&word->anim.animation, AnimationCurveEaseIn);
}
Beispiel #8
0
static void bar_text_layer_create(Window *window){
  // Create time TextLayer
  s_bar_layer = text_layer_create(GRect(95,80,38,4));
  text_layer_setup(window, s_bar_layer);
  text_layer_set_background_color(s_bar_layer, GColorWhite);
}