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/textfield.cpp | |
parent | 41d545176ffad2fb33158ca3415d2a0a983fffdb (diff) | |
download | plus-29f929794c7519b049de0be3af635f05d7e83be6.tar.gz plus-29f929794c7519b049de0be3af635f05d7e83be6.tar.bz2 plus-29f929794c7519b049de0be3af635f05d7e83be6.tar.xz plus-29f929794c7519b049de0be3af635f05d7e83be6.zip |
move some methods from base/graphics into render/graphics.
Remove base/graphcs.
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r-- | src/gui/widgets/textfield.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index b655de830..b1d188f22 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -137,7 +137,7 @@ void TextField::updateAlpha() } } -void TextField::draw(gcn::Graphics *graphics) +void TextField::draw(Graphics *graphics) { BLOCK_START("TextField::draw") updateAlpha(); @@ -155,7 +155,7 @@ void TextField::draw(gcn::Graphics *graphics) BLOCK_END("TextField::draw") } -void TextField::drawFrame(gcn::Graphics *graphics) +void TextField::drawFrame(Graphics *graphics) { BLOCK_START("TextField::drawFrame") const int bs = 2 * mFrameSize; @@ -661,12 +661,14 @@ void TextField::handleCopy() const sendBuffer(text); } -void TextField::drawCaret(gcn::Graphics* graphics, int x) +void TextField::drawCaret(Graphics* graphics, int x) { - const gcn::Rectangle &clipArea = graphics->getCurrentClipArea(); + const gcn::Rectangle *const clipArea = graphics->getCurrentClipArea(); + if (!clipArea) + return; graphics->setColor(*mCaretColor); - graphics->drawLine(x + mPadding, clipArea.height - mPadding, + graphics->drawLine(x + mPadding, clipArea->height - mPadding, x + mPadding, mPadding); } |