#include <progressbar.h>
Definition at line 38 of file progressbar.h.
Public Member Functions | |
| ProgressBar (float progress=0.0f, unsigned int width=40, unsigned int height=7, Uint8 red=150, Uint8 green=150, Uint8 blue=150) | |
| Constructor, initializes the progress with the given value. | |
| ~ProgressBar () | |
| Destructor. | |
| void | logic () |
| Performs progress bar logic (fading colors). | |
| void | draw (gcn::Graphics *graphics) |
| Draws the progress bar. | |
| void | setProgress (float progress) |
| Sets the current progress. | |
| float | getProgress () const |
| Returns the current progress. | |
| void | setColor (Uint8, Uint8 green, Uint8 blue) |
| Change the filling of the progress bar. | |
| Uint8 | getRed () const |
| Returns the red value of color. | |
| Uint8 | getGreen () const |
| Returns the green value of color. | |
| Uint8 | getBlue () const |
| Returns the blue value of color. | |
| void | setText (const std::string &text) |
| Sets the text shown on the progress bar. | |
| const std::string & | text () const |
| Returns the text shown on the progress bar. | |
| void | setSmoothProgress (bool smoothProgress) |
| Set wether the progress is moved smoothly. | |
| void | setSmoothColorChange (bool smoothColorChange) |
| Set wether the color changing is made smoothly. | |
Private Attributes | |
| float | mProgress |
| float | mProgressToGo |
| bool | mSmoothProgress |
| Uint8 | mRed |
| Uint8 | mGreen |
| Uint8 | mBlue |
| Uint8 | mRedToGo |
| Uint8 | mGreenToGo |
| Uint8 | mBlueToGo |
| bool | mSmoothColorChange |
| std::string | mText |
| bool | mUpdated |
Static Private Attributes | |
| static ImageRect | mBorder |
| static int | mInstances = 0 |
| static float | mAlpha = 1.0 |
| static const gcn::Color | TEXT_COLOR |
| ProgressBar::ProgressBar | ( | float | progress = 0.0f, |
|
| unsigned int | width = 40, |
|||
| unsigned int | height = 7, |
|||
| Uint8 | red = 150, |
|||
| Uint8 | green = 150, |
|||
| Uint8 | blue = 150 | |||
| ) |
Constructor, initializes the progress with the given value.
Definition at line 40 of file progressbar.cpp.
| ProgressBar::~ProgressBar | ( | ) |
| void ProgressBar::logic | ( | ) |
| void ProgressBar::draw | ( | gcn::Graphics * | graphics | ) |
| void ProgressBar::setProgress | ( | float | progress | ) |
| float ProgressBar::getProgress | ( | ) | const [inline] |
| void ProgressBar::setColor | ( | Uint8 | red, | |
| Uint8 | green, | |||
| Uint8 | blue | |||
| ) |
| Uint8 ProgressBar::getRed | ( | ) | const [inline] |
| Uint8 ProgressBar::getGreen | ( | ) | const [inline] |
| Uint8 ProgressBar::getBlue | ( | ) | const [inline] |
| void ProgressBar::setText | ( | const std::string & | text | ) | [inline] |
| const std::string& ProgressBar::text | ( | ) | const [inline] |
| void ProgressBar::setSmoothProgress | ( | bool | smoothProgress | ) | [inline] |
| void ProgressBar::setSmoothColorChange | ( | bool | smoothColorChange | ) | [inline] |
float ProgressBar::mProgress [private] |
Definition at line 119 of file progressbar.h.
float ProgressBar::mProgressToGo [private] |
Definition at line 119 of file progressbar.h.
bool ProgressBar::mSmoothProgress [private] |
Definition at line 120 of file progressbar.h.
Uint8 ProgressBar::mRed [private] |
Definition at line 122 of file progressbar.h.
Uint8 ProgressBar::mGreen [private] |
Definition at line 122 of file progressbar.h.
Uint8 ProgressBar::mBlue [private] |
Definition at line 122 of file progressbar.h.
Uint8 ProgressBar::mRedToGo [private] |
Definition at line 123 of file progressbar.h.
Uint8 ProgressBar::mGreenToGo [private] |
Definition at line 123 of file progressbar.h.
Uint8 ProgressBar::mBlueToGo [private] |
Definition at line 123 of file progressbar.h.
bool ProgressBar::mSmoothColorChange [private] |
Definition at line 124 of file progressbar.h.
std::string ProgressBar::mText [private] |
Definition at line 126 of file progressbar.h.
bool ProgressBar::mUpdated [private] |
Definition at line 127 of file progressbar.h.
ImageRect ProgressBar::mBorder [static, private] |
Definition at line 129 of file progressbar.h.
int ProgressBar::mInstances = 0 [static, private] |
Definition at line 130 of file progressbar.h.
float ProgressBar::mAlpha = 1.0 [static, private] |
Definition at line 131 of file progressbar.h.
const gcn::Color ProgressBar::TEXT_COLOR [static, private] |
Definition at line 133 of file progressbar.h.
1.5.5