summaryrefslogtreecommitdiff
path: root/src/gui/widgets/dropdown.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-27 14:42:15 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-27 23:15:05 +0300
commit60add2c149c9c61bfbede5ae92cfe216927aca8a (patch)
tree9ded097faa108eb07b9ca1c8ce4490882e238a44 /src/gui/widgets/dropdown.cpp
parent2babe1d6491f5231b0e97349ccb198b92bb90ba9 (diff)
downloadmanaverse-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/gui/widgets/dropdown.cpp')
-rw-r--r--src/gui/widgets/dropdown.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 8c8f6843f..ec564146e 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -227,9 +227,10 @@ void DropDown::draw(gcn::Graphics* graphics)
if (mPopup->getListModel() && mPopup->getSelected() >= 0)
{
- graphics->setFont(getFont());
+ gcn::Font *const font = getFont();
+ graphics->setFont(font);
graphics->setColor(mForegroundColor);
- graphics->drawText(mPopup->getListModel()->getElementAt(
+ font->drawString(graphics, mPopup->getListModel()->getElementAt(
mPopup->getSelected()), mPadding, mPadding);
}