void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { Menu* menu = data; if(menu->id == 0 && section_index == 0) menu_cell_basic_header_draw(ctx, cell_layer, "Stations"); else menu_cell_basic_header_draw(ctx, cell_layer, menu->title); }
static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { switch (section_index) { case 0: menu_cell_basic_header_draw(ctx, cell_layer, "Top posts"); break; default: menu_cell_basic_header_draw(ctx, cell_layer, "Posts"); break; } }
static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { switch (section_index) { case 0: menu_cell_basic_header_draw(ctx, cell_layer, "Bus Elche"); break; case 1: menu_cell_basic_header_draw(ctx, cell_layer, "Favoritos"); break; } }
static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { switch (section_index) { case 0: menu_cell_basic_header_draw(ctx, cell_layer, "Programas"); break; case 1: menu_cell_basic_header_draw(ctx, cell_layer, "Herramientas"); break; } }
static void draw_header_callback(GContext *ctx, const Layer *cell_layer, uint16_t section_index, void *context) { if (plugUsed +1 > 20){ snprintf(label, sizeof(label), "Choose a letter%*sMax!", DISTANCE_BETWEEN_LABEL, ""); menu_cell_basic_header_draw(ctx, cell_layer, label); } else{ menu_cell_basic_header_draw(ctx, cell_layer, "Choose a letter"); } }
static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { if (section_index == 0) { menu_cell_basic_header_draw(ctx, cell_layer, "Location/Contact"); } else if (section_index == 2) { menu_cell_basic_header_draw(ctx, cell_layer, "Friday 3"); } else if (section_index == 3) { menu_cell_basic_header_draw(ctx, cell_layer, "Saturday 4"); } else if (section_index == 4) { menu_cell_basic_header_draw(ctx, cell_layer, "Sunday 5"); } }
static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { switch (section_index) { case 0: #ifdef PBL_ROUND menu_cell_basic_header_draw(ctx, cell_layer, " rss-news"); #else menu_cell_basic_header_draw(ctx, cell_layer, "rss-news"); #endif break; } }
void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { // Determine which section we're working with switch (section_index) { case MENU_SECTION_MAIN: // Draw title text in the section header menu_cell_basic_header_draw(ctx, cell_layer, "Main Section"); break; case MENU_SECTION_ATTACK: menu_cell_basic_header_draw(ctx, cell_layer, "Attack Section"); break; } }
static void draw_header_callback(GContext *ctx, const Layer *cell_layer, uint16_t section_index, void *callback_context) { switch(section_index) { case 0: menu_cell_basic_header_draw(ctx, cell_layer, "Appearance"); break; case 1: menu_cell_basic_header_draw(ctx, cell_layer, "Session Review"); break; case 2: menu_cell_basic_header_draw(ctx, cell_layer, "Pacerband"); break; } }
// Here we draw what each header is static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { // Determine which section we're working with switch (section_index) { case 0: // Draw title text in the section header menu_cell_basic_header_draw(ctx, cell_layer, " Track an Activity"); break; case 1: menu_cell_basic_header_draw(ctx, cell_layer, "Current Activity: "); break; } }
static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { // Determine which section we're working with switch (section_index) { case 0: // Draw title text in the section header menu_cell_basic_header_draw(ctx, cell_layer, "Some example items"); break; case 1: // Draw title text in the section header menu_cell_basic_header_draw(ctx, cell_layer, "One more"); break; } }
/** * TODO: documentation. */ void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { // Determine which section we're working with switch (section_index) { case 0: // Draw title text in the section header menu_cell_basic_header_draw(ctx, cell_layer, "Next stops"); break; case 1: menu_cell_basic_header_draw(ctx, cell_layer, "Last stop"); break; } }
// Here we draw what each header is static void menu_draw_header_callback(GContext *ctx, const Layer *cell_layer, uint16_t section_index, void *data) { // Determine which section we're working with switch (section_index) { case 0: // Draw title text in the section header menu_cell_basic_header_draw(ctx, cell_layer, "At The Gym"); break; case 1: menu_cell_basic_header_draw(ctx, cell_layer, "At Home"); break; default: break; } }
static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { // Determine which section we're working with switch (section_index) { case 0: // Draw title text in the section header menu_cell_basic_header_draw(ctx, cell_layer, "Bookmarks"); break; case 1: menu_cell_basic_header_draw(ctx, cell_layer, "Edit Mode"); break; case 2: menu_cell_basic_header_draw(ctx, cell_layer, "Clear"); break; } }
// DRAW HEADERS static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { switch (section_index) { case 0: menu_cell_basic_header_draw(ctx, cell_layer, "Basic Operation"); break; case 1: menu_cell_basic_header_draw(ctx, cell_layer, "Light Level"); break; case 2: menu_cell_basic_header_draw(ctx, cell_layer, "Setup"); break; } }
void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { switch(section_index){ case 0: menu_cell_basic_header_draw(ctx, cell_layer, "Emerate"); break; } }
static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { // Determine which section we're working with switch (section_index) { case 0: // Draw title text in the section header menu_cell_basic_header_draw(ctx, cell_layer, "Temperature Query"); break; case 1: menu_cell_basic_header_draw(ctx, cell_layer, "°C/°F Convert"); break; case 2: menu_cell_basic_header_draw(ctx, cell_layer, "Arduino Control"); case 3: menu_cell_basic_header_draw(ctx, cell_layer, "Additional Features"); break; } }
static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { switch (section_index) { case 0: // Draw title text in the section header menu_cell_basic_header_draw(ctx, cell_layer, "Meal"); break; } }
static void ts_draw_header_cb(GContext *ctx, const Layer *cell_layer, uint16_t section, void *context) { char *header; if(section == 0) header = listTitle; else header = "**unexpected header**"; menu_cell_basic_header_draw(ctx, cell_layer, header); }
static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { #ifdef PBL_COLOR graphics_context_set_fill_color(ctx, HEADER_BG_COLOR); graphics_fill_rect(ctx, layer_get_bounds(cell_layer), 0, GCornerNone); graphics_context_set_text_color(ctx, HEADER_FG_COLOR); #endif menu_cell_basic_header_draw(ctx, cell_layer, schedule.slots[section_index].time); }
static void main_menu_header_draw_cb(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { switch (section_index) { case 0: menu_cell_basic_header_draw(ctx, cell_layer, "Main menu"); break; } }
static void mc_draw_header(GContext *ctx, const Layer *cell_layer, uint16_t section_index, void *data) { SimpleColorMenuLayer *layerData = (SimpleColorMenuLayer *)data; if(section_index == 0 && layerData->title != NULL) { menu_cell_basic_header_draw( ctx, cell_layer, layerData->title); } }
void arrivals_draw_header(GContext *ctx, const Layer *cell_layer, uint16_t section_index, void *callback_context) { switch(section_index) { case ARRIVAL_SECTION_MAIN: if(!http_located) { menu_cell_basic_header_draw(ctx, cell_layer, "Loading..."); } else { menu_cell_basic_header_draw(ctx, cell_layer, arrival_time_str); } break; case ARRIVAL_SECTION_CREDITS: menu_cell_basic_header_draw(ctx, cell_layer, "Powered by OneBusAway"); break; case ARRIVAL_SECTION_OPTIONS: menu_cell_basic_header_draw(ctx, cell_layer, "Options"); break; default: APP_LOG(APP_LOG_LEVEL_ERROR, "arrivals_draw_header: unknown section %d", section_index); } }
// Here we draw what each header is void whatsapp_menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { // Draw title text in the section header char temp[32]; if (!whatsapp_loading) { snprintf(temp, sizeof(temp), "Conversations (%d)", num_conversations); menu_cell_basic_header_draw(ctx, cell_layer, temp); } else { if (num_conversations == 0) { menu_cell_basic_header_draw(ctx, cell_layer, "Conversations"); } else { snprintf(temp, sizeof(temp), "Conversations (%d) [...]", num_conversations); menu_cell_basic_header_draw(ctx, cell_layer, temp); } } }
static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { // Determine which section we're working with switch (section_index) { case 0: menu_cell_basic_header_draw(ctx, cell_layer, "Note"); case 1: case 2: case 3: case 4: // menu_cell_basic_header_draw(ctx, cell_layer, "Menu prova"); break; } }
static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { char s_time_text[] = "00:00"; time_t s_time; time(&s_time); strftime(s_time_text, sizeof(s_time_text), "%H:%M", localtime(&s_time)); char s_title[30]; strncpy(s_title, data_stops[current_stop_id], 24); strcat(s_title, " "); strcat(s_title, s_time_text); menu_cell_basic_header_draw(ctx, cell_layer, s_title); }
// Draw menu section headers static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { graphics_context_set_fill_color(ctx, COLOR_FALLBACK(GColorLightGray, GColorWhite)); graphics_context_set_text_color(ctx, GColorBlack); graphics_fill_rect(ctx, layer_get_bounds(cell_layer), 0, GCornerNone); switch (section_index) { case MENU_ALARM_SECTION: menu_cell_basic_header_draw(ctx, cell_layer, NULL); break; case MENU_MISC_SECTION: graphics_draw_text(ctx, "Misc Settings", s_header_font, layer_get_bounds(cell_layer), GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); //menu_cell_basic_header_draw(ctx, cell_layer, "Misc Settings"); break; case MENU_SMART_SECTION: graphics_draw_text(ctx, "Smart Alarm", s_header_font, layer_get_bounds(cell_layer), GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); //menu_cell_basic_header_draw(ctx, cell_layer, "Smart Alarm"); break; case MENU_DST_SECTION: graphics_draw_text(ctx, "DST Check", s_header_font, layer_get_bounds(cell_layer), GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); //menu_cell_basic_header_draw(ctx, cell_layer, "DST Check"); break; } }
// Here we draw what each header is static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { char str[24]; switch (current_type) { case SETUP: snprintf(str, 24, "Setup"); break; case PRACTICE_KNOWN: case PRACTICE_UNKNOWN: snprintf(str, 24, "Practice"); break; case TRIAL_KNOWN: snprintf(str, 24, "Trial %d - Known", trial_num); break; case TRIAL_UNKNOWN: snprintf(str, 24, "Trial %d - Unknown", trial_num); break; case RESULTS: snprintf(str, 24, "Results"); break; } menu_cell_basic_header_draw(ctx, cell_layer, str); }
static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { menu_cell_basic_header_draw(ctx, cell_layer, MENU_HEADER); }
static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *data) { menu_cell_basic_header_draw(ctx, cell_layer, "Bus Stops Nearby"); }