From a6e60bef83d9b845ffba6de9fe71ca1afd277166 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Tue, 22 Feb 2005 15:14:29 +0000 Subject: Rewrote Progress Bars. They'll be fully working soon. --- src/gui/progressbar.h | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) (limited to 'src/gui/progressbar.h') diff --git a/src/gui/progressbar.h b/src/gui/progressbar.h index 88bd08cc..22161995 100644 --- a/src/gui/progressbar.h +++ b/src/gui/progressbar.h @@ -25,7 +25,8 @@ #define __PROGRESSBAR_H__ #include -#define PROGRESSBAR_HEIGHT 7 +#include "../resources/image.h" + /** * A progress bar. * @@ -37,9 +38,14 @@ class ProgressBar : public gcn::Widget { * Constructor, initializes the progress with the given value. */ ProgressBar(float progress = 0.0f, int x = 0, int y = 0, - int width = 40, unsigned char red = 150, unsigned green = 150, + int width = 40, int height = 7, unsigned char red = 150, unsigned green = 150, unsigned char blue = 150); + /** + * Destructor + */ + ~ProgressBar(); + /** * Draws the progress bar. */ @@ -66,26 +72,16 @@ class ProgressBar : public gcn::Widget { Red = MyRed; Green = MyGreen; Blue = MyBlue; }; - int getHeight() { - return PROGRESSBAR_HEIGHT; - }; - - int getWidth() { - return Width; - }; - - int getX() { - return X; - }; - - int getY() { - return Y; - }; - private: float progress; unsigned char Red, Green, Blue; - int X, Y, Width; + // Bar Images + Image *dBackground; + Image *dTopLeftBorder, *dTopRightBorder, *dBottomLeftBorder, *dBottomRightBorder; + Image *dLeftBorder, *dRightBorder, *dTopBorder, *dBottomBorder; + #ifndef USE_OPENGL + SDL_Surface *ColorBar; + #endif }; #endif -- cgit v1.2.3-60-g2f50