A progress bar.
More...
#include <progressbar.h>
|
| | ProgressBar (float progress=0.0f, int width=40, int height=7, int color=-1) |
| | Constructor, initializes the progress with the given value.
|
| |
| void | logic () override |
| | Performs progress bar logic (fading colors)
|
| |
| void | draw (gcn::Graphics *graphics) override |
| | Draws the progress bar.
|
| |
| void | setProgress (float progress) |
| | Sets the current progress.
|
| |
| float | getProgress () const |
| | Returns the current progress.
|
| |
| void | setProgressPalette (int progressPalette) |
| | Change the ProgressPalette for this ProgressBar to follow or -1 to disable this and manage color manually.
|
| |
| void | setColor (const gcn::Color &color) |
| | Change the color of the progress bar.
|
| |
| const gcn::Color & | getColor () const |
| | Returns the color of the progress bar.
|
| |
| 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 whether the progress is moved smoothly.
|
| |
| void | setSmoothColorChange (bool smoothColorChange) |
| | Set whether the color changing is made smoothly.
|
| |
A progress bar.
Definition at line 33 of file progressbar.h.
◆ ProgressBar()
| ProgressBar::ProgressBar |
( |
float |
progress = 0.0f, |
|
|
int |
width = 40, |
|
|
int |
height = 7, |
|
|
int |
color = -1 |
|
) |
| |
Constructor, initializes the progress with the given value.
Definition at line 32 of file progressbar.cpp.
◆ draw()
| void ProgressBar::draw |
( |
gcn::Graphics * |
graphics | ) |
|
|
override |
◆ getColor()
| const gcn::Color & ProgressBar::getColor |
( |
| ) |
const |
|
inline |
Returns the color of the progress bar.
Definition at line 77 of file progressbar.h.
◆ getProgress()
| float ProgressBar::getProgress |
( |
| ) |
const |
|
inline |
◆ logic()
| void ProgressBar::logic |
( |
| ) |
|
|
override |
Performs progress bar logic (fading colors)
Definition at line 49 of file progressbar.cpp.
◆ setColor()
| void ProgressBar::setColor |
( |
const gcn::Color & |
color | ) |
|
◆ setProgress()
| void ProgressBar::setProgress |
( |
float |
progress | ) |
|
◆ setProgressPalette()
| void ProgressBar::setProgressPalette |
( |
int |
progressPalette | ) |
|
Change the ProgressPalette for this ProgressBar to follow or -1 to disable this and manage color manually.
Definition at line 110 of file progressbar.cpp.
◆ setSmoothColorChange()
| void ProgressBar::setSmoothColorChange |
( |
bool |
smoothColorChange | ) |
|
|
inline |
Set whether the color changing is made smoothly.
Definition at line 100 of file progressbar.h.
◆ setSmoothProgress()
| void ProgressBar::setSmoothProgress |
( |
bool |
smoothProgress | ) |
|
|
inline |
Set whether the progress is moved smoothly.
Definition at line 94 of file progressbar.h.
◆ setText()
| void ProgressBar::setText |
( |
const std::string & |
text | ) |
|
|
inline |
Sets the text shown on the progress bar.
Definition at line 82 of file progressbar.h.
◆ text()
| const std::string & ProgressBar::text |
( |
| ) |
const |
|
inline |
Returns the text shown on the progress bar.
Definition at line 88 of file progressbar.h.
◆ mColor
| gcn::Color ProgressBar::mColor |
|
private |
< Entry in ProgressPalette or -1 for none.
Definition at line 108 of file progressbar.h.
◆ mColorToGo
| gcn::Color ProgressBar::mColorToGo |
|
private |
◆ mProgress
| float ProgressBar::mProgress |
|
private |
◆ mProgressPalette
| int ProgressBar::mProgressPalette |
|
private |
◆ mProgressToGo
| float ProgressBar::mProgressToGo |
|
private |
◆ mSmoothColorChange
| bool ProgressBar::mSmoothColorChange = true |
|
private |
◆ mSmoothProgress
| bool ProgressBar::mSmoothProgress = true |
|
private |
◆ mText
| std::string ProgressBar::mText |
|
private |
The documentation for this class was generated from the following files: