// This is the menu item draw callback where you specify what each item should look like static void menu_draw_row_callback(GContext* ctx, const Layer *cell_layer, MenuIndex *cell_index, void *data) { // Switch on section //menu_cell_basic_draw(ctx, cell_layer, "device1", NULL, NULL); switch (cell_index->section) { // Available AirPlay Devices case 0: menu_cell_basic_draw(ctx, cell_layer, airplay_devices[cell_index->row], NULL, is_device_active(airplay_devices[cell_index->row]) ? action_icon_pause : action_icon_play); break; } }
// This is the menu item draw callback where you specify what each item should look like static void menu_draw_row_callback(GContext* ctx, const Layer *cell_layer, MenuIndex *cell_index, void *data) { GBitmap *icon = is_device_active(airplay_devices[cell_index->row]) ? action_icon_checkmark : NULL; menu_cell_basic_draw(ctx, cell_layer, airplay_devices[cell_index->row], NULL, icon); }