summaryrefslogtreecommitdiffstats
path: root/libmenu/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmenu/menu.c')
-rw-r--r--libmenu/menu.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/libmenu/menu.c b/libmenu/menu.c
index ed67cc9f2e..3ba54be45c 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
};
@@ -225,7 +225,7 @@ static int menu_parse_config(char* buffer, struct m_config *mconfig)
}
}
-
+
/// This will build the menu_defs list from the cfg file
#define BUF_STEP 1024
@@ -562,7 +562,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;
@@ -574,7 +574,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
@@ -582,7 +582,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);
@@ -682,7 +682,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);
@@ -714,7 +714,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;
}
@@ -734,7 +734,7 @@ int menu_text_num_lines(char* txt, int max_width) {
}
return l;
}
-
+
static char* menu_text_get_next_line(char* txt, int max_width) {
int i = 0;
render_txt(txt);
@@ -756,22 +756,22 @@ static 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_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Unsupported output format!!!!\n");
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];
@@ -781,5 +781,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]);
}
-
+
}