summaryrefslogtreecommitdiff
path: root/src/gui/progressbar.h
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-02-22 15:14:29 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-02-22 15:14:29 +0000
commita6e60bef83d9b845ffba6de9fe71ca1afd277166 (patch)
treefa9ea8339ab44bf0f51c681ef138e65805936d6b /src/gui/progressbar.h
parent032a97e40be8369526811f67a9e7fa5561365461 (diff)
downloadmana-a6e60bef83d9b845ffba6de9fe71ca1afd277166.tar.gz
mana-a6e60bef83d9b845ffba6de9fe71ca1afd277166.tar.bz2
mana-a6e60bef83d9b845ffba6de9fe71ca1afd277166.tar.xz
mana-a6e60bef83d9b845ffba6de9fe71ca1afd277166.zip
Rewrote Progress Bars. They'll be fully working soon.
Diffstat (limited to 'src/gui/progressbar.h')
-rw-r--r--src/gui/progressbar.h34
1 files changed, 15 insertions, 19 deletions
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 <guichan.hpp>
-#define PROGRESSBAR_HEIGHT 7
+#include "../resources/image.h"
+
/**
* A progress bar.
*
@@ -37,10 +38,15 @@ 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.
*/
void draw(gcn::Graphics *graphics);
@@ -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