summaryrefslogtreecommitdiff
path: root/src/gui/widgets/shoplistbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/shoplistbox.cpp')
-rw-r--r--src/gui/widgets/shoplistbox.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp
index 1dd58532e..11f350165 100644
--- a/src/gui/widgets/shoplistbox.cpp
+++ b/src/gui/widgets/shoplistbox.cpp
@@ -95,10 +95,9 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics)
mAlpha = Client::getGuiAlpha();
const int alpha = static_cast<int>(mAlpha * 255.0f);
-
Graphics *graphics = static_cast<Graphics*>(gcnGraphics);
-
- graphics->setFont(getFont());
+ gcn::Font *const font = getFont();
+ graphics->setFont(font);
// Draw the list elements
for (int i = 0, y = 0;
@@ -159,7 +158,7 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics)
graphics->setColor(mForegroundSelectedColor);
else
graphics->setColor(mForegroundColor);
- graphics->drawText(mListModel->getElementAt(i),
+ font->drawString(graphics, mListModel->getElementAt(i),
ITEM_ICON_SIZE + mPadding,
y + (ITEM_ICON_SIZE - getFont()->getHeight()) / 2 + mPadding);
}