summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-15 22:21:02 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-15 22:21:02 +0300
commitca9fac131283ed536971799bef0d1fff4ef8adc1 (patch)
treeec70584d20b117c5d2446ef42b898eeacdda9d12 /src/gui/widgets/itemcontainer.cpp
parent29f929794c7519b049de0be3af635f05d7e83be6 (diff)
downloadplus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.gz
plus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.bz2
plus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.xz
plus-ca9fac131283ed536971799bef0d1fff4ef8adc1.zip
Remove useless graphics casts.
Diffstat (limited to 'src/gui/widgets/itemcontainer.cpp')
-rw-r--r--src/gui/widgets/itemcontainer.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index eedbc1bd0..0913dcae3 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -251,7 +251,6 @@ void ItemContainer::draw(Graphics *graphics)
return;
BLOCK_START("ItemContainer::draw")
- Graphics *const g = static_cast<Graphics *const>(graphics);
gcn::Font *const font = getFont();
for (int j = 0; j < mGridRows; j++)
@@ -278,16 +277,18 @@ void ItemContainer::draw(Graphics *graphics)
if (mShowMatrix[itemIndex] == mSelectedIndex)
{
if (mSelImg)
- g->drawImage2(mSelImg, itemX, itemY);
+ graphics->drawImage2(mSelImg, itemX, itemY);
}
image->setAlpha(1.0F); // ensure the image if fully drawn...
- g->drawImage2(image, itemX + mPaddingItemX,
+ graphics->drawImage2(image,
+ itemX + mPaddingItemX,
itemY + mPaddingItemY);
if (mProtectedImg && PlayerInfo::isItemProtected(
item->getId()))
{
- g->drawImage2(mProtectedImg,
- itemX + mPaddingItemX, itemY + mPaddingItemY);
+ graphics->drawImage2(mProtectedImg,
+ itemX + mPaddingItemX,
+ itemY + mPaddingItemY);
}
}
}
@@ -324,11 +325,11 @@ void ItemContainer::draw(Graphics *graphics)
}
if (item->isEquipped())
- g->setColorAll(mEquipedColor, mEquipedColor2);
+ graphics->setColorAll(mEquipedColor, mEquipedColor2);
else
- g->setColorAll(mUnEquipedColor, mUnEquipedColor2);
+ graphics->setColorAll(mUnEquipedColor, mUnEquipedColor2);
- font->drawString(g, caption,
+ font->drawString(graphics, caption,
itemX + (mBoxWidth - font->getWidth(caption)) / 2,
itemY + mEquippedTextPadding);
}