diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-15 22:21:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-15 22:21:02 +0300 |
commit | ca9fac131283ed536971799bef0d1fff4ef8adc1 (patch) | |
tree | ec70584d20b117c5d2446ef42b898eeacdda9d12 /src/gui/widgets/dropshortcutcontainer.cpp | |
parent | 29f929794c7519b049de0be3af635f05d7e83be6 (diff) | |
download | plus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.gz plus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.bz2 plus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.xz plus-ca9fac131283ed536971799bef0d1fff4ef8adc1.zip |
Remove useless graphics casts.
Diffstat (limited to 'src/gui/widgets/dropshortcutcontainer.cpp')
-rw-r--r-- | src/gui/widgets/dropshortcutcontainer.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp index 892a74638..9b37682fe 100644 --- a/src/gui/widgets/dropshortcutcontainer.cpp +++ b/src/gui/widgets/dropshortcutcontainer.cpp @@ -107,8 +107,7 @@ void DropShortcutContainer::draw(Graphics *graphics) mBackgroundImg->setAlpha(mAlpha); } - Graphics *const g = static_cast<Graphics*>(graphics); - drawBackground(g); + drawBackground(graphics); const Inventory *const inv = PlayerInfo::getInventory(); if (!inv) @@ -144,12 +143,12 @@ void DropShortcutContainer::draw(Graphics *graphics) caption = "Eq."; image->setAlpha(1.0F); - g->drawImage2(image, itemX, itemY); + graphics->drawImage2(image, itemX, itemY); if (item->isEquipped()) - g->setColorAll(mEquipedColor, mEquipedColor2); + graphics->setColorAll(mEquipedColor, mEquipedColor2); else - g->setColorAll(mUnEquipedColor, mUnEquipedColor2); - font->drawString(g, caption, + graphics->setColorAll(mUnEquipedColor, mUnEquipedColor2); + font->drawString(graphics, caption, itemX + (mBoxWidth - font->getWidth(caption)) / 2, itemY + mBoxHeight - 14); } |