diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-22 20:03:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-22 20:03:20 +0300 |
commit | 15309c3bb75a5d5d1b56171fe1bd91b96e1735b8 (patch) | |
tree | 456439afcc908a50360bb8968f143dab32a4251e /src/gui/widgets/progressbar.h | |
parent | 2425f9821deb57ceab2f6e6a5aa01a0784e07148 (diff) | |
download | plus-15309c3bb75a5d5d1b56171fe1bd91b96e1735b8.tar.gz plus-15309c3bb75a5d5d1b56171fe1bd91b96e1735b8.tar.bz2 plus-15309c3bb75a5d5d1b56171fe1bd91b96e1735b8.tar.xz plus-15309c3bb75a5d5d1b56171fe1bd91b96e1735b8.zip |
allow fill complete part of progress bar with images.
For this need add in progress bar theme file option fillImage and set it to 1.
Then add progress bar xml file for image with name: name_fill.xml.
Default is: progressbar_fill.xml
New theme option: fillImage
New theme file (default name): progressbar_fill.xml
Diffstat (limited to 'src/gui/widgets/progressbar.h')
-rw-r--r-- | src/gui/widgets/progressbar.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h index 3bfceab18..9b2ab353a 100644 --- a/src/gui/widgets/progressbar.h +++ b/src/gui/widgets/progressbar.h @@ -52,7 +52,7 @@ class ProgressBar final : public gcn::Widget, ProgressBar(const Widget2 *const widget, float progress, const int width, const int height, const int backColor, - const std::string &skin); + const std::string &skin, const std::string &skinFill); A_DELETE_COPY(ProgressBar) @@ -140,7 +140,9 @@ class ProgressBar final : public gcn::Widget, { mPadding = padding; } private: + ImageRect mFillRect; Skin *mSkin; + Skin *mSkinFill; float mProgress; float mProgressToGo; @@ -157,6 +159,7 @@ class ProgressBar final : public gcn::Widget, static int mInstances; static float mAlpha; + bool mFillImage; bool mSmoothProgress; bool mSmoothColorChange; bool mRedraw; |