static void nsec_intro(void) { for(uint8_t noise = 128; noise <= 128; noise -= 8) { gfx_fillScreen(SSD1306_BLACK); gfx_drawBitmap(17, 11, nsec_logo_bitmap, nsec_logo_bitmap_width, nsec_logo_bitmap_height, SSD1306_WHITE); nsec_gfx_effect_addNoise(noise); gfx_update(); } for(uint8_t noise = 0; noise <= 128; noise += 8) { gfx_fillScreen(SSD1306_BLACK); gfx_drawBitmap(17, 11, nsec_logo_bitmap, nsec_logo_bitmap_width, nsec_logo_bitmap_height, SSD1306_WHITE); nsec_gfx_effect_addNoise(noise); gfx_update(); } }
int dispName_icon(struct menu_item * item,int i,int j,int clear_txt,int clear_icon,int selected) { int color; int x,y; int w,h; BITMAP * icon=NULL; x=current_menu->dx+i*(item_width+space_btw_items); y=current_menu->dy+TITLE_OFFSET+j*(item_height+space_btw_items); if(item->sub) { current_menu->submenu_str(item->data,tmp); color=current_menu->sub_color; /* => submenu */ icon=current_menu->getSubIcon(item->data); } else { current_menu->item_str(item->data,tmp); color=current_menu->txt_color; /* => item */ icon=current_menu->getItemIcon(item->data); } CHG_PLANE if(clear_icon) { gfx_fillRect(current_menu->bg_color,x, y , item_width, icon->height); if(icon && icon->width<=item_width && icon->height<=icon_zone_height) gfx_drawBitmap(icon,x+(item_width-icon->width)/2,y+(icon_zone_height-icon->height)/2); } if(clear_txt) { gfx_fillRect(current_menu->bg_color,x, y + icon_zone_height+1, item_width,item_height-(icon_zone_height+1)); } gfx_getStringSize(tmp, &w, &h); if(selected) gfx_putS(color, current_menu->select_color,x+(item_width-w)/2, y+icon_zone_height+1, tmp); else gfx_putS(color, current_menu->bg_color,x+(item_width-w)/2, y+icon_zone_height+1, tmp); RESTORE_PLANE return 1; }