summaryrefslogtreecommitdiff
path: root/src/gui/widgets/spellshortcutcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-27 01:09:30 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-27 23:15:05 +0300
commit81d317cf80f4c333396c708bbefca16be2362c8c (patch)
tree1bd2818130625873c50ecbda9b3e826e51c809bb /src/gui/widgets/spellshortcutcontainer.cpp
parente56ea6cbf7726b258a4eb6b51a0574cddd862558 (diff)
downloadplus-81d317cf80f4c333396c708bbefca16be2362c8c.tar.gz
plus-81d317cf80f4c333396c708bbefca16be2362c8c.tar.bz2
plus-81d317cf80f4c333396c708bbefca16be2362c8c.tar.xz
plus-81d317cf80f4c333396c708bbefca16be2362c8c.zip
Improve containders text draw speed.
Diffstat (limited to 'src/gui/widgets/spellshortcutcontainer.cpp')
-rw-r--r--src/gui/widgets/spellshortcutcontainer.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp
index af9457078..ee43a5d3f 100644
--- a/src/gui/widgets/spellshortcutcontainer.cpp
+++ b/src/gui/widgets/spellshortcutcontainer.cpp
@@ -40,6 +40,8 @@
#include "utils/gettext.h"
+#include <guichan/font.hpp>
+
#include "debug.h"
SpellShortcutContainer::SpellShortcutContainer(const unsigned number) :
@@ -102,8 +104,8 @@ void SpellShortcutContainer::draw(gcn::Graphics *graphics)
}
Graphics *const g = static_cast<Graphics *const>(graphics);
-
- graphics->setFont(getFont());
+ gcn::Font *const font = getFont();
+ graphics->setFont(font);
const int selectedId = spellShortcut->getSelectedItem();
g->setColor(mForegroundColor);
@@ -139,8 +141,8 @@ void SpellShortcutContainer::draw(gcn::Graphics *graphics)
}
}
- g->drawText(spell->getSymbol(), itemX + 2,
- itemY + mBoxHeight / 2, gcn::Graphics::LEFT);
+ font->drawString(g, spell->getSymbol(),
+ itemX + 2, itemY + mBoxHeight / 2);
}
}