diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-07-27 21:55:20 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-07-27 21:55:20 +0000 |
commit | d15d76976b6e57a9f421ab034c6f841051b962f3 (patch) | |
tree | ab0c37c90af9f76158b96f195c05be9b221e9f42 /src/gui/scrollarea.cpp | |
parent | aa362286c725e17ec88aa46f8f6af9ca90d744b3 (diff) | |
download | mana-d15d76976b6e57a9f421ab034c6f841051b962f3.tar.gz mana-d15d76976b6e57a9f421ab034c6f841051b962f3.tar.bz2 mana-d15d76976b6e57a9f421ab034c6f841051b962f3.tar.xz mana-d15d76976b6e57a9f421ab034c6f841051b962f3.zip |
Committing merging opengl and sdl part 3 by Andrej
Diffstat (limited to 'src/gui/scrollarea.cpp')
-rw-r--r-- | src/gui/scrollarea.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp index c8524657..3350a252 100644 --- a/src/gui/scrollarea.cpp +++ b/src/gui/scrollarea.cpp @@ -180,10 +180,12 @@ void ScrollArea::draw(gcn::Graphics *graphics) { graphics->setColor(getBaseColor()); if (useOpenGL) { +#ifdef USE_OPENGL dynamic_cast<gcn::OpenGLGraphics*>(graphics)->fillRectangle(gcn::Rectangle(getWidth() - mScrollbarWidth, getHeight() - mScrollbarWidth, mScrollbarWidth, mScrollbarWidth)); +#endif } else { dynamic_cast<gcn::SDLGraphics*>(graphics)->fillRectangle(gcn::Rectangle(getWidth() - mScrollbarWidth, @@ -197,7 +199,9 @@ void ScrollArea::draw(gcn::Graphics *graphics) { gcn::Rectangle contdim = mContent->getDimension(); if (useOpenGL) { +#ifdef USE_OPENGL dynamic_cast<gcn::OpenGLGraphics*>(graphics)->pushClipArea(getContentDimension()); +#endif } else { dynamic_cast<gcn::SDLGraphics*>(graphics)->pushClipArea(getContentDimension()); @@ -211,14 +215,18 @@ void ScrollArea::draw(gcn::Graphics *graphics) rec.width += 2 * mContent->getBorderSize(); rec.height += 2 * mContent->getBorderSize(); if (useOpenGL) { +#ifdef USE_OPENGL dynamic_cast<gcn::OpenGLGraphics*>(graphics)->pushClipArea(rec); +#endif } else { dynamic_cast<gcn::SDLGraphics*>(graphics)->pushClipArea(rec); } mContent->drawBorder(graphics); if (useOpenGL) { +#ifdef USE_OPENGL dynamic_cast<gcn::OpenGLGraphics*>(graphics)->popClipArea(); +#endif } else { dynamic_cast<gcn::SDLGraphics*>(graphics)->popClipArea(); @@ -226,15 +234,19 @@ void ScrollArea::draw(gcn::Graphics *graphics) } if (useOpenGL) { +#ifdef USE_OPENGL dynamic_cast<gcn::OpenGLGraphics*>(graphics)->pushClipArea(contdim); +#endif } else { dynamic_cast<gcn::SDLGraphics*>(graphics)->pushClipArea(contdim); } mContent->draw(graphics); if (useOpenGL) { +#ifdef USE_OPENGL dynamic_cast<gcn::OpenGLGraphics*>(graphics)->popClipArea(); dynamic_cast<gcn::OpenGLGraphics*>(graphics)->popClipArea(); +#endif } else { dynamic_cast<gcn::SDLGraphics*>(graphics)->popClipArea(); @@ -330,7 +342,9 @@ void ScrollArea::drawVBar(gcn::Graphics *graphics) gcn::Rectangle dim = getVerticalBarDimension(); graphics->setColor(gcn::Color(0, 0, 0, 32)); if (useOpenGL) { +#ifdef USE_OPENGL dynamic_cast<gcn::OpenGLGraphics*>(graphics)->fillRectangle(dim); +#endif } else { dynamic_cast<gcn::SDLGraphics*>(graphics)->fillRectangle(dim); @@ -343,7 +357,9 @@ void ScrollArea::drawHBar(gcn::Graphics *graphics) gcn::Rectangle dim = getHorizontalBarDimension(); graphics->setColor(gcn::Color(0, 0, 0, 32)); if (useOpenGL) { +#ifdef USE_OPENGL dynamic_cast<gcn::OpenGLGraphics*>(graphics)->fillRectangle(dim); +#endif } else { dynamic_cast<gcn::SDLGraphics*>(graphics)->fillRectangle(dim); |