diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-27 14:42:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-27 23:15:05 +0300 |
commit | 60add2c149c9c61bfbede5ae92cfe216927aca8a (patch) | |
tree | 9ded097faa108eb07b9ca1c8ce4490882e238a44 /src/guichan/widgets/textbox.cpp | |
parent | 2babe1d6491f5231b0e97349ccb198b92bb90ba9 (diff) | |
download | manaverse-60add2c149c9c61bfbede5ae92cfe216927aca8a.tar.gz manaverse-60add2c149c9c61bfbede5ae92cfe216927aca8a.tar.bz2 manaverse-60add2c149c9c61bfbede5ae92cfe216927aca8a.tar.xz manaverse-60add2c149c9c61bfbede5ae92cfe216927aca8a.zip |
Improve a bit draw speed in other controls.
Diffstat (limited to 'src/guichan/widgets/textbox.cpp')
-rw-r--r-- | src/guichan/widgets/textbox.cpp | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/guichan/widgets/textbox.cpp b/src/guichan/widgets/textbox.cpp index 66441894b..e743ef64f 100644 --- a/src/guichan/widgets/textbox.cpp +++ b/src/guichan/widgets/textbox.cpp @@ -118,33 +118,11 @@ namespace gcn adjustSize(); } +/* void TextBox::draw(Graphics* graphics) { - BLOCK_START("TextBox::draw") - if (mOpaque) - { - graphics->setColor(mBackgroundColor); - graphics->fillRectangle(Rectangle(0, 0, getWidth(), getHeight())); - } - - if (isFocused() && isEditable()) - { - drawCaret(graphics, getFont()->getWidth( - mTextRows[mCaretRow].substr(0, mCaretColumn)), - mCaretRow * getFont()->getHeight()); - } - - graphics->setColor(mForegroundColor); - graphics->setFont(getFont()); - - for (size_t i = 0, sz = mTextRows.size(); i < sz; i++) - { - // Move the text one pixel so we can have a caret before a letter. - graphics->drawText(mTextRows[i], 1, - static_cast<int>(i * getFont()->getHeight())); - } - BLOCK_END("TextBox::draw") } +*/ void TextBox::drawCaret(Graphics* graphics, int x, int y) { |