summaryrefslogtreecommitdiff
path: root/src/gui/itemcontainer.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-16 14:29:42 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-16 14:29:42 +0000
commit51224bed60d5bed45b53e99b44bc1123a2a9cb68 (patch)
tree2acbf76139b6ef76d21aaf98ee09e326a59c4467 /src/gui/itemcontainer.cpp
parent96e61ed3ff7e41976ac8788363d6df8719037962 (diff)
downloadmana-client-51224bed60d5bed45b53e99b44bc1123a2a9cb68.tar.gz
mana-client-51224bed60d5bed45b53e99b44bc1123a2a9cb68.tar.bz2
mana-client-51224bed60d5bed45b53e99b44bc1123a2a9cb68.tar.xz
mana-client-51224bed60d5bed45b53e99b44bc1123a2a9cb68.zip
Made Image/SubImage being drawn by Graphics. Removed some redundant code.
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