Commits

Trammell Hudson committed a41923c

text layer starting

  • Participants
  • Parent commits b069a3f

Comments (0)

Files changed (3)

 
 SRCS += \
 	sprintf.c \
+	layer.c \
 
 LIB := libpebble_th.a
 
+/** \file
+ * Text layer management.
+ */
+
+#include "pebble_th.h"
+
+void
+text_layer_setup(
+	Window * window,
+	TextLayer * layer,
+	GRect frame,
+	GFont font
+)
+{
+	text_layer_init(layer, frame);
+	text_layer_set_text(layer, "");
+	text_layer_set_text_color(layer, GColorWhite);
+	text_layer_set_background_color(layer, GColorClear);
+	text_layer_set_font(layer, font);
+        layer_add_child(&window->layer, &layer->layer);
+}
+
+
+

lib/src/pebble_th.h

 #define _pblth_h_
 
 #include <stdint.h>
+#include "pebble_os.h"
 
 
 extern int
 	...
 );
 
+
+extern void
+text_layer_setup(
+	Window * window,
+	TextLayer * layer,
+	GRect frame,
+	GFont font
+);
+
 #endif