diff -uwbr --exclude=CVS firmware.orig/drivers/lcd.c firmware/drivers/lcd.c --- firmware.orig/drivers/lcd.c 2002-08-01 08:59:44.000000000 +0200 +++ firmware/drivers/lcd.c 2002-08-01 09:43:00.000000000 +0200 @@ -1046,6 +1046,144 @@ } } +/* + * Print a progress bar + */ +void lcd_progressbar(int x, int y, int width, int height, int percent, int direction) +{ + int pos; + int i,j; + + /* draw horizontal lines */ + for(i=x+1;i<=x+width-2;i++) { + DRAW_PIXEL(i,y); + DRAW_PIXEL(i,(y+height-1)); + } + + /* draw vertical lines */ + for(i=1;i100) + pos=100; + + switch (direction) + { + case BAR_RIGHT: + pos=(width-2)*pos/100; + for(i=1;i<=pos;i++) + for(j=1;j100) + pos=100; + + switch (direction) + { + case BAR_RIGHT: + pos=(width-height-1)*pos/100; + break; + case BAR_LEFT: + pos=(width-height-1)*(100-pos)/100; + break; + case BAR_DOWN: + pos=(height-width-1)*pos/100; + break; + case BAR_UP: + pos=(height-width-1)*(100-pos)/100; + break; + } + + if(direction == BAR_LEFT || direction == BAR_RIGHT) + for(i=1;ilength % 60000 / 1000 ); lcd_puts(0, 6, buffer); + + lcd_slidebar(1,LCD_HEIGHT-7,LCD_WIDTH-2,5,id3->elapsed*100/id3->length,BAR_RIGHT); + lcd_update(); #else /* Display time with the filename scroll only because