From 15309c3bb75a5d5d1b56171fe1bd91b96e1735b8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 22 Dec 2013 20:03:20 +0300 Subject: 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 --- src/gui/widgets/progressbar.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets/progressbar.h') 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; -- cgit v1.2.3-70-g09d2