1
0
Fork 0
forked from len0rd/rockbox

progressbar, slidebar and scrollbar are not drawn, if they don't fit on

screen.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2414 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Markus Braun 2002-09-25 14:04:41 +00:00
parent e4d1bda5e4
commit d3d342dc27

View file

@ -28,6 +28,19 @@ void progressbar(int x, int y, int width, int height, int percent, int direction
{
int pos;
/* check position and dimensions */
if(x < 0)
return;
if(y < 0)
return;
if(x + width > LCD_WIDTH)
return;
if(y + height > LCD_HEIGHT)
return;
/* draw box */
lcd_drawrect(x, y, width, height);
@ -76,6 +89,19 @@ void slidebar(int x, int y, int width, int height, int percent, int direction)
{
int pos;
/* check position and dimensions */
if(x < 0)
return;
if(y < 0)
return;
if(x + width > LCD_WIDTH)
return;
if(y + height > LCD_HEIGHT)
return;
/* draw box */
lcd_drawrect(x, y, width, height);
@ -128,6 +154,19 @@ void scrollbar(int x, int y, int width, int height, int items, int min_shown, in
int start;
int size;
/* check position and dimensions */
if(x < 0)
return;
if(y < 0)
return;
if(x + width > LCD_WIDTH)
return;
if(y + height > LCD_HEIGHT)
return;
/* draw box */
lcd_drawrect(x, y, width, height);