diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-15 20:31:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-15 20:31:52 +0300 |
commit | 29f929794c7519b049de0be3af635f05d7e83be6 (patch) | |
tree | 5627bfcb7f19a349f065c207476c871bc5c3aa40 /src/gui/widgets/browserbox.cpp | |
parent | 41d545176ffad2fb33158ca3415d2a0a983fffdb (diff) | |
download | manaverse-29f929794c7519b049de0be3af635f05d7e83be6.tar.gz manaverse-29f929794c7519b049de0be3af635f05d7e83be6.tar.bz2 manaverse-29f929794c7519b049de0be3af635f05d7e83be6.tar.xz manaverse-29f929794c7519b049de0be3af635f05d7e83be6.zip |
move some methods from base/graphics into render/graphics.
Remove base/graphcs.
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index d7ce9ab12..e0fbf3d17 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -37,10 +37,11 @@ #include "utils/stringutils.h" #include "utils/timer.h" -#include "gui/base/graphics.hpp" #include "gui/base/font.hpp" #include "gui/base/cliprectangle.hpp" +#include "render/graphics.h" + #include <algorithm> #include "debug.h" @@ -446,13 +447,15 @@ void BrowserBox::mouseMoved(gcn::MouseEvent &event) ? static_cast<int>(i - mLinks.begin()) : -1; } -void BrowserBox::draw(gcn::Graphics *graphics) +void BrowserBox::draw(Graphics *graphics) { BLOCK_START("BrowserBox::draw") - const gcn::ClipRectangle &cr = graphics->getCurrentClipArea(); + const gcn::ClipRectangle *const cr = graphics->getCurrentClipArea(); + if (!cr) + return; Graphics *const graphics2 = static_cast<Graphics *const>(graphics); - mYStart = cr.y - cr.yOffset; - const int yEnd = mYStart + cr.height; + mYStart = cr->y - cr->yOffset; + const int yEnd = mYStart + cr->height; if (mYStart < 0) mYStart = 0; |