summaryrefslogtreecommitdiff
path: root/src/gui/progressbar.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-14 15:13:54 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-14 15:13:54 +0000
commit4f6c1dad35e575588b73524692d973dec06447c3 (patch)
treed052c3c7db66450888af132ac9dcefb7c28b58a6 /src/gui/progressbar.cpp
parentebccde5d779f25584386ddc0c4bdc6331877bcc6 (diff)
downloadmana-4f6c1dad35e575588b73524692d973dec06447c3.tar.gz
mana-4f6c1dad35e575588b73524692d973dec06447c3.tar.bz2
mana-4f6c1dad35e575588b73524692d973dec06447c3.tar.xz
mana-4f6c1dad35e575588b73524692d973dec06447c3.zip
Support for drawing using OpenGL. Don't expect it to be fast yet though.
Diffstat (limited to 'src/gui/progressbar.cpp')
-rw-r--r--src/gui/progressbar.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/progressbar.cpp b/src/gui/progressbar.cpp
index 09e05932..cc12c247 100644
--- a/src/gui/progressbar.cpp
+++ b/src/gui/progressbar.cpp
@@ -42,6 +42,7 @@ ProgressBar::ProgressBar(float progress, int x, int y, int width, unsigned char
void ProgressBar::draw(gcn::Graphics *graphics)
{
+#ifndef USE_OPENGL
int absx, absy;
getAbsolutePosition(absx, absy);
@@ -73,9 +74,10 @@ void ProgressBar::draw(gcn::Graphics *graphics)
Temp = absx+X+int(float(Width)*progress)-2;
if ( Temp < (absx+X+PROGRESSBAR_HEIGHT+1) ) Temp = absx+X+PROGRESSBAR_HEIGHT;
DrawLine(screen, absx+X+PROGRESSBAR_HEIGHT+1, absy+Y+1, Temp, absy+Y+1, abs(Red-40), abs(Green-40), abs(Blue-40));
- DrawLine(screen, absx+X+PROGRESSBAR_HEIGHT, absy+Y+1, absx+X+2, absy+Y+PROGRESSBAR_HEIGHT-1, abs(Red-40), abs(Green-40), abs(Blue-40));
-
+ DrawLine(screen, absx+X+PROGRESSBAR_HEIGHT, absy+Y+1, absx+X+2, absy+Y+PROGRESSBAR_HEIGHT-1, abs(Red-40), abs(Green-40), abs(Blue-40));
+
SDL_UnlockSurface(screen);
+#endif
}
void ProgressBar::setProgress(float progress)