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/emoteshortcutcontainer.cpp | |
parent | 29f929794c7519b049de0be3af635f05d7e83be6 (diff) | |
download | mv-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.gz mv-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.bz2 mv-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.xz mv-ca9fac131283ed536971799bef0d1fff4ef8adc1.zip |
Remove useless graphics casts.
Diffstat (limited to 'src/gui/widgets/emoteshortcutcontainer.cpp')
-rw-r--r-- | src/gui/widgets/emoteshortcutcontainer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp index bdb5c3163..dc25d9e5c 100644 --- a/src/gui/widgets/emoteshortcutcontainer.cpp +++ b/src/gui/widgets/emoteshortcutcontainer.cpp @@ -112,11 +112,10 @@ void EmoteShortcutContainer::draw(Graphics *graphics) mAlpha = client->getGuiAlpha(); } - Graphics *const g = static_cast<Graphics *const>(graphics); gcn::Font *const font = getFont(); - drawBackground(g); + drawBackground(graphics); - g->setColorAll(mForegroundColor, mForegroundColor2); + graphics->setColorAll(mForegroundColor, mForegroundColor2); for (unsigned i = 0; i < mMaxItems; i++) { const int emoteX = (i % mGridWidth) * mBoxWidth; @@ -126,7 +125,7 @@ void EmoteShortcutContainer::draw(Graphics *graphics) const std::string key = inputManager.getKeyValueString( Input::KEY_EMOTE_1 + i); - font->drawString(g, key, emoteX + 2, emoteY + 2); + font->drawString(graphics, key, emoteX + 2, emoteY + 2); } unsigned sz = static_cast<unsigned>(mEmoteImg.size()); if (sz > mMaxItems) @@ -139,7 +138,8 @@ void EmoteShortcutContainer::draw(Graphics *graphics) const AnimatedSprite *const sprite = emoteImg->sprite; if (sprite) { - sprite->draw(g, (i % mGridWidth) * mBoxWidth + 2, + sprite->draw(graphics, + (i % mGridWidth) * mBoxWidth + 2, (i / mGridWidth) * mBoxHeight + 10); } } |