summaryrefslogtreecommitdiff
path: root/src/gui/itemcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r--src/gui/itemcontainer.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index 0ccfc3db..534364dc 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -95,15 +95,17 @@ void ItemContainer::draw(gcn::Graphics* graphics)
// Draw selection image below selected item
if (selectedItem == i)
{
- selImg->draw(screen, x + itemX, y + itemY);
+ dynamic_cast<Graphics*>(graphics)->drawImage(
+ selImg, x + itemX, y + itemY);
}
// Draw item icon
if (itemDb->getItemInfo(items[i].id)->getImage() > 0)
{
- itemset->spriteset[itemDb->getItemInfo(
- items[i].id)->getImage() - 1]->draw(
- screen, x + itemX, y + itemY);
+ Image *image = itemset->spriteset[itemDb->getItemInfo(
+ items[i].id)->getImage() - 1];
+ dynamic_cast<Graphics*>(graphics)->drawImage(
+ image, x + itemX, y + itemY);
}
// Draw item caption