diff options
Diffstat (limited to 'libmenu/menu.c')
-rw-r--r-- | libmenu/menu.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libmenu/menu.c b/libmenu/menu.c index 038b969e4f..c8cf349c94 100644 --- a/libmenu/menu.c +++ b/libmenu/menu.c @@ -59,7 +59,7 @@ menu_info_t* menu_info_list[] = { &menu_info_console, #ifdef CONFIG_DVBIN &menu_info_dvbsel, -#endif +#endif &menu_info_pref, NULL }; @@ -222,7 +222,7 @@ static int menu_parse_config(char* buffer) { } } - + /// This will build the menu_defs list from the cfg file #define BUF_STEP 1024 @@ -552,7 +552,7 @@ void menu_draw_text_full(mp_image_t* mpi,char* txt, // Find the first line if(align & MENU_TEXT_VCENTER) sy = ymin + ((h - need_h)/2); - else if(align & MENU_TEXT_BOT) + else if(align & MENU_TEXT_BOT) sy = ymax - need_h - 1; else sy = y; @@ -564,7 +564,7 @@ void menu_draw_text_full(mp_image_t* mpi,char* txt, else if(align & MENU_TEXT_RIGHT) sx = xmax - need_w; #endif - + xmid = xmin + (xmax - xmin) / 2; xrmin = xmin; // Clamp the bb to the mpi size @@ -572,7 +572,7 @@ void menu_draw_text_full(mp_image_t* mpi,char* txt, if(xmin < 0) xmin = 0; if(ymax > mpi->h) ymax = mpi->h; if(xmax > mpi->w) xmax = mpi->w; - + // Jump some the beginnig text if needed while(sy < ymin && *txt) { int c=utf8_get_char((const char**)&txt); @@ -672,7 +672,7 @@ void menu_draw_text_full(mp_image_t* mpi,char* txt, sy += vo_font->height + vspace; } } - + int menu_text_length(char* txt) { int l = 0; render_txt(txt); @@ -704,7 +704,7 @@ void menu_text_size(char* txt,int max_width, int vspace, int warp, int* _w, int* i -= vo_font->charspace; if (i > w) w = i; } - + *_w = w; *_h = (l-1) * (vo_font->height + vspace) + vo_font->height; } @@ -724,7 +724,7 @@ int menu_text_num_lines(char* txt, int max_width) { } return l; } - + char* menu_text_get_next_line(char* txt, int max_width) { int i = 0; render_txt(txt); @@ -746,22 +746,22 @@ char* menu_text_get_next_line(char* txt, int max_width) { void menu_draw_box(mp_image_t* mpi,unsigned char grey,unsigned char alpha, int x, int y, int w, int h) { draw_alpha_f draw_alpha = get_draw_alpha(mpi->imgfmt); int g; - + if(!draw_alpha) { mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_UnsupportedOutformat); return; } - + if(x > mpi->w || y > mpi->h) return; - + if(x < 0) w += x, x = 0; if(x+w > mpi->w) w = mpi->w-x; if(y < 0) h += y, y = 0; if(y+h > mpi->h) h = mpi->h-y; - + g = ((256-alpha)*grey)>>8; if(g < 1) g = 1; - + { int stride = (w+7)&(~7); // round to 8 char pic[stride*h],pic_alpha[stride*h]; @@ -771,5 +771,5 @@ void menu_draw_box(mp_image_t* mpi,unsigned char grey,unsigned char alpha, int x mpi->planes[0] + y * mpi->stride[0] + x * (mpi->bpp>>3), mpi->stride[0]); } - + } |