summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-07-14 18:34:47 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-07-14 18:34:47 +0000
commita960e4a0abf38104f91c6a13d3d91efb9407b4c5 (patch)
tree25d20937a950192055a56a1db99d8d5c9fe4995d /src
parent1de4ecd6690a0de808c079e4d3b6398574d189cb (diff)
downloadmana-a960e4a0abf38104f91c6a13d3d91efb9407b4c5.tar.gz
mana-a960e4a0abf38104f91c6a13d3d91efb9407b4c5.tar.bz2
mana-a960e4a0abf38104f91c6a13d3d91efb9407b4c5.tar.xz
mana-a960e4a0abf38104f91c6a13d3d91efb9407b4c5.zip
Small optimizations to the progress bars code.
Diffstat (limited to 'src')
-rw-r--r--src/gui/progressbar.cpp12
-rw-r--r--src/gui/progressbar.h10
2 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/progressbar.cpp b/src/gui/progressbar.cpp
index 34c164d1..a12c6510 100644
--- a/src/gui/progressbar.cpp
+++ b/src/gui/progressbar.cpp
@@ -28,8 +28,8 @@
ImageRect ProgressBar::mBorder;
int ProgressBar::mInstances = 0;
-ProgressBar::ProgressBar(float progress, int x, int y, int width, int height,
- int red, int green, int blue):
+ProgressBar::ProgressBar(float progress, int x, int y, unsigned int width, unsigned int height,
+ unsigned char red, unsigned char green, unsigned char blue):
gcn::Widget(),
red(red), green(green), blue(blue),
redToGo(red), greenToGo(green), blueToGo(blue)
@@ -117,11 +117,11 @@ float ProgressBar::getProgress()
return progress;
}
-void ProgressBar::setColor(int red, int green, int blue)
+void ProgressBar::setColor(unsigned char red, unsigned char green, unsigned char blue)
{
- this->redToGo = red;
- this->greenToGo = green;
- this->blueToGo = blue;
+ redToGo = red;
+ greenToGo = green;
+ blueToGo = blue;
}
unsigned char ProgressBar::getRed()
diff --git a/src/gui/progressbar.h b/src/gui/progressbar.h
index 9568de9d..9b0a1041 100644
--- a/src/gui/progressbar.h
+++ b/src/gui/progressbar.h
@@ -39,8 +39,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,
- int width = 40, int height = 7,
- int red = 150, int green = 150, int blue = 150);
+ unsigned int width = 40, unsigned int height = 7,
+ unsigned char red = 150, unsigned char green = 150, unsigned char blue = 150);
/**
* Destructor.
@@ -70,7 +70,7 @@ class ProgressBar : public gcn::Widget {
/**
* Change the filling of the progress bar.
*/
- void setColor(int red, int green, int blue);
+ void setColor(unsigned char red, unsigned char green, unsigned char blue);
/**
* Get The red value of color
@@ -89,8 +89,8 @@ class ProgressBar : public gcn::Widget {
private:
float progress;
- int red, green, blue;
- int redToGo, greenToGo, blueToGo;
+ unsigned char red, green, blue;
+ unsigned char redToGo, greenToGo, blueToGo;
static ImageRect mBorder;
static int mInstances;