diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/widgets/progressbar.cpp | 22 | ||||
-rw-r--r-- | src/gui/widgets/progressbar.h | 4 |
2 files changed, 17 insertions, 9 deletions
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index ef3aa19a0..babf3f0e2 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -50,7 +50,7 @@ ProgressBar::ProgressBar(const Widget2 *const widget, float progress, mSmoothProgress(true), mProgressPalette(color), mSmoothColorChange(true), - mVertexes(new GraphicsVertexes()), + mVertexes(new ImageCollection), mRedraw(true), mPadding(2), mFillPadding(3) @@ -185,14 +185,22 @@ void ProgressBar::render(Graphics *graphics) gcn::Font *const oldFont = graphics->getFont(); const gcn::Color oldColor = graphics->getColor(); - if (mRedraw || graphics->getRedraw()) + if (openGLMode != 2) { - mRedraw = false; - graphics->calcWindow(mVertexes, 0, 0, - mDimension.width, mDimension.height, mSkin->getBorder()); - } + if (mRedraw || graphics->getRedraw()) + { + mRedraw = false; + graphics->calcWindow(mVertexes, 0, 0, + mDimension.width, mDimension.height, mSkin->getBorder()); + } - graphics->drawImageRect2(mVertexes, mSkin->getBorder()); + graphics->drawTile(mVertexes); + } + else + { + graphics->drawImageRect(0, 0, mDimension.width, mDimension.height, + mSkin->getBorder()); + } // The bar if (mProgress > 0) diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h index 599292da5..fe03ac7e1 100644 --- a/src/gui/widgets/progressbar.h +++ b/src/gui/widgets/progressbar.h @@ -33,7 +33,7 @@ #include "localconsts.h" class Graphics; -class GraphicsVertexes; +class ImageCollection; class ImageRect; class Skin; @@ -149,7 +149,7 @@ class ProgressBar final : public gcn::Widget, bool mSmoothColorChange; std::string mText; - GraphicsVertexes *mVertexes; + ImageCollection *mVertexes; bool mRedraw; unsigned int mPadding; unsigned int mFillPadding; |