summaryrefslogtreecommitdiff
path: root/src/gui/widgets/progressbar.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-03-04 22:41:19 -0700
committerJared Adams <jaxad0127@gmail.com>2010-03-12 14:49:27 -0700
commit781b3c9f17708cc5fe08eb3c9ee38d596364d97c (patch)
tree833797c9b9168ab58864ffe4cf8ed028060e44a2 /src/gui/widgets/progressbar.h
parent96b64757954f07d196599b3c1131a6603982c930 (diff)
downloadmana-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.tar.gz
mana-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.tar.bz2
mana-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.tar.xz
mana-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.zip
Split Palette into Theme and UserPalette
Themes can now control the colors they use. Colors in the Viewport (being names, particles, etc) can still be changed by the user. Also make ProgressBars more easily colored. DyePalette was made more flexible in the process. Also fixes comparing strings of different lengths insensitively. Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src/gui/widgets/progressbar.h')
-rw-r--r--src/gui/widgets/progressbar.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index a6bb49d9..56bcb0a0 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -42,7 +42,7 @@ class ProgressBar : public gcn::Widget
*/
ProgressBar(float progress = 0.0f,
int width = 40, int height = 7,
- const gcn::Color &color = gcn::Color(150, 150, 150));
+ int color = -1);
~ProgressBar();
@@ -72,17 +72,15 @@ class ProgressBar : public gcn::Widget
float getProgress() const { return mProgress; }
/**
- * Change the color of the progress bar.
+ * Change the ProgressPalette for this ProgressBar to follow or -1 to
+ * disable this and manage color manually.
*/
- void setColor(const gcn::Color &color);
+ void setProgressPalette(int progressPalette);
/**
* Change the color of the progress bar.
- *
- * This is an overload provided for convenience.
*/
- inline void setColor(int r, int g, int b)
- { setColor(gcn::Color(r, g, b)); }
+ void setColor(const gcn::Color &color);
/**
* Returns the color of the progress bar.
@@ -124,6 +122,7 @@ class ProgressBar : public gcn::Widget
float mProgress, mProgressToGo;
bool mSmoothProgress;
+ int mProgressPalette; /** < Entry in ProgressPalette or -1 for none. */
gcn::Color mColor;
gcn::Color mColorToGo;
bool mSmoothColorChange;