diff options
author | Martin Schirrmacher <vdr.skinflat@schirrmacher.eu> | 2013-08-20 22:03:52 +0200 |
---|---|---|
committer | Martin Schirrmacher <vdr.skinflat@schirrmacher.eu> | 2013-08-20 22:03:52 +0200 |
commit | 57fe4a2bf12adc4ea461569551ecac935dbf3aae (patch) | |
tree | cb61a4dc28aebe6830c7740bd122d312ae96e9f6 /baserender.c | |
parent | 18f84694f84c8e782fce274477dfefbd090b0345 (diff) | |
download | skin-flat-57fe4a2bf12adc4ea461569551ecac935dbf3aae.tar.gz skin-flat-57fe4a2bf12adc4ea461569551ecac935dbf3aae.tar.bz2 |
menu item channel
Diffstat (limited to 'baserender.c')
-rw-r--r-- | baserender.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/baserender.c b/baserender.c index d68ab3c..6bca3ba 100644 --- a/baserender.c +++ b/baserender.c @@ -320,6 +320,20 @@ void cFlatBaseRender::contentDraw(void) { } } +void cFlatBaseRender::ProgressBarDrawInline(cPixmap *Pixmap, int Left, int Top, int Width, int Height, int Current, int Total, tColor ColorFg, tColor ColorBarFg, tColor ColorBg) { + int Middle = Top + Height/2; + double percentLeft = ((double)Current) / (double)Total; + + // background + Pixmap->DrawRectangle(cRect( Left, Top, Width, Height), ColorBg); + + // small line + Pixmap->DrawRectangle(cRect( Left, Middle-1, Width, 2), ColorFg); + + if (Current > 0) + Pixmap->DrawRectangle(cRect( Left, Middle - 4, (Width * percentLeft), 8), ColorBarFg); +} + void cFlatBaseRender::ProgressBarCreate(int Left, int Top, int Width, tColor ColorFg, tColor ColorBarFg, tColor ColorBg) { progressBarTop = Top; progressBarWidth = Width; |