diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-10 07:46:41 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-10 07:46:41 +0000 |
commit | 7bbe721a23b9caba7a67ac806be10aa536f7f46d (patch) | |
tree | d87383830d132ca08b472abed69b20f3f3eee58a /src/gui/progressbar.cpp | |
parent | 4d338e801f8b1175585de6b5e7b8b2ca331b682f (diff) | |
download | mana-7bbe721a23b9caba7a67ac806be10aa536f7f46d.tar.gz mana-7bbe721a23b9caba7a67ac806be10aa536f7f46d.tar.bz2 mana-7bbe721a23b9caba7a67ac806be10aa536f7f46d.tar.xz mana-7bbe721a23b9caba7a67ac806be10aa536f7f46d.zip |
Moved knowledge about whether we use OpenGL into the Graphics class. Added helper function for being creation to reduce code duplication. Some code simplifications.
Diffstat (limited to 'src/gui/progressbar.cpp')
-rw-r--r-- | src/gui/progressbar.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/gui/progressbar.cpp b/src/gui/progressbar.cpp index fb03d90b..505262b6 100644 --- a/src/gui/progressbar.cpp +++ b/src/gui/progressbar.cpp @@ -104,16 +104,8 @@ void ProgressBar::draw(gcn::Graphics *graphics) if (progress > 0) { graphics->setColor(gcn::Color(red, green, blue, 200)); - if (useOpenGL) { -#ifdef USE_OPENGL - dynamic_cast<gcn::OpenGLGraphics*>(graphics)->fillRectangle(gcn::Rectangle(4, 4, + graphics->fillRectangle(gcn::Rectangle(4, 4, (int)(progress * (getWidth() - 8)), getHeight() - 8)); -#endif - } - else { - dynamic_cast<gcn::SDLGraphics*>(graphics)->fillRectangle(gcn::Rectangle(4, 4, - (int)(progress * (getWidth() - 8)), getHeight() - 8)); - } } } |