void window_load(Window *me) { currentIcon = gbitmap_create_with_resource(RESOURCE_ID_ICON); historyIcon = gbitmap_create_with_resource(RESOURCE_ID_RECENT); Layer* topLayer = window_get_root_layer(menuWindow); menuLoadingLayer = text_layer_create(GRect(0, 10, 144, 168 - 16)); text_layer_set_text_alignment(menuLoadingLayer, GTextAlignmentCenter); text_layer_set_text(menuLoadingLayer, "Loading..."); text_layer_set_font(menuLoadingLayer, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); layer_add_child(topLayer, (Layer*) menuLoadingLayer); quitTitle = text_layer_create(GRect(0, 70, 144, 50)); text_layer_set_text_alignment(quitTitle, GTextAlignmentCenter); text_layer_set_text(quitTitle, "Press back again if app does not close in several seconds"); layer_add_child(topLayer, (Layer*) quitTitle); quitText = text_layer_create(GRect(0, 10, 144, 50)); text_layer_set_text_alignment(quitText, GTextAlignmentCenter); text_layer_set_text(quitText, "Quitting...\n Please wait"); text_layer_set_font(quitText, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); layer_add_child(topLayer, (Layer*) quitText); setCurWindow(0); }
void window_load(Window *me) { setCurWindow(0); show_loading(); DictionaryIterator *iterator; app_message_outbox_begin(&iterator); dict_write_uint8(iterator, 0, 0); app_message_outbox_send(); app_comm_set_sniff_interval(SNIFF_INTERVAL_REDUCED); app_comm_set_sniff_interval(SNIFF_INTERVAL_NORMAL); }
static void window_appears(Window *me) { if (closingMode) { closeApp(); app_timer_register(3000, closing_timer, NULL); } else if (menuLoaded) { main_menu_show_menu(); } else { show_loading(); } setCurWindow(0); }
static void window_appears(Window *window) { setCurWindow(1); }
static void window_appear(Window *me) { setCurWindow(2); }
void window_load(Window *me) { setCurWindow(WINDOW_MAIN_MENU); }