summaryrefslogtreecommitdiff
path: root/src/gui/progressbar.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 03:34:45 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 03:34:45 +0000
commit8bde9095c5840b8d62ebafe11beaed98877d6ac2 (patch)
tree537f717a339d1247cae222eb7a354ea5dbe8babf /src/gui/progressbar.h
parenta246c08cef5e4d598fc07a681eb971bfbcf01519 (diff)
downloadmana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.gz
mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.bz2
mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.xz
mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.zip
* Made Sprite into an interface implemented by both FloorItem and Being, which
hook themselves into the map on construction. The improved fringe layer is working as expected now. * Made sure TMW compiles without warnings even when using "-Wconversion -Wshadow -Wcast-qual -Wwrite-strings -ansi -pedantic", lots of cleanups. * Added two new small tilesets that contain the desert tiles that are twice and three times the height of a normal tile. One well in new_3-1 has been converted to use the new double tiles for testing purposes.
Diffstat (limited to 'src/gui/progressbar.h')
-rw-r--r--src/gui/progressbar.h38
1 files changed, 24 insertions, 14 deletions
diff --git a/src/gui/progressbar.h b/src/gui/progressbar.h
index fe9e7085..cd62c498 100644
--- a/src/gui/progressbar.h
+++ b/src/gui/progressbar.h
@@ -26,6 +26,8 @@
#include <guichan/widget.hpp>
+#include <SDL_types.h>
+
class ImageRect;
@@ -40,8 +42,8 @@ class ProgressBar : public gcn::Widget {
* Constructor, initializes the progress with the given value.
*/
ProgressBar(float progress = 0.0f, int x = 0, int y = 0,
- unsigned int width = 40, unsigned int height = 7,
- unsigned char red = 150, unsigned char green = 150, unsigned char blue = 150);
+ unsigned int width = 40, unsigned int height = 7,
+ Uint8 red = 150, Uint8 green = 150, Uint8 blue = 150);
/**
* Destructor.
@@ -51,47 +53,55 @@ class ProgressBar : public gcn::Widget {
/**
* Performs progress bar logic (fading colors)
*/
- void logic();
+ void
+ logic();
/**
* Draws the progress bar.
*/
- void draw(gcn::Graphics *graphics);
+ void
+ draw(gcn::Graphics *graphics);
/**
* Sets the current progress.
*/
- void setProgress(float progress);
+ void
+ setProgress(float progress);
/**
* Returns the current progress.
*/
- float getProgress();
+ float
+ getProgress() { return mProgress; }
/**
* Change the filling of the progress bar.
*/
- void setColor(unsigned char red, unsigned char green, unsigned char blue);
+ void
+ setColor(Uint8, Uint8 green, Uint8 blue);
/**
* Get The red value of color
*/
- unsigned char getRed();
+ Uint8
+ getRed() { return mRed; }
/**
* Get The red value of color
*/
- unsigned char getGreen();
+ Uint8
+ getGreen() { return mGreen; }
- /**
+ /**
* Get The red value of color
*/
- unsigned char getBlue();
+ Uint8
+ getBlue() { return mBlue; }
private:
- float progress;
- unsigned char red, green, blue;
- unsigned char redToGo, greenToGo, blueToGo;
+ float mProgress;
+ Uint8 mRed, mGreen, mBlue;
+ Uint8 mRedToGo, mGreenToGo, mBlueToGo;
static ImageRect mBorder;
static int mInstances;