summaryrefslogtreecommitdiff
path: root/src/gui/gui.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/gui.cpp
parent29f929794c7519b049de0be3af635f05d7e83be6 (diff)
downloadmanaplus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.gz
manaplus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.bz2
manaplus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.xz
manaplus-ca9fac131283ed536971799bef0d1fff4ef8adc1.zip
Remove useless graphics casts.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 00a3da25e..4da397a73 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -499,13 +499,12 @@ void Gui::draw()
if ((client->getMouseFocused() || button & SDL_BUTTON(1))
&& mMouseCursors && mCustomCursor && mMouseCursorAlpha > 0.0F)
{
- Graphics *g2 = static_cast<Graphics*>(mGraphics);
const Image *const image = dragDrop.getItemImage();
if (image)
{
const int posX = mouseX - (image->mBounds.w / 2);
const int posY = mouseY - (image->mBounds.h / 2);
- g2->drawImage2(image, posX, posY);
+ mGraphics->drawImage2(image, posX, posY);
}
if (mGuiFont)
{
@@ -514,8 +513,8 @@ void Gui::draw()
{
const int posX = mouseX - mGuiFont->getWidth(str) / 2;
const int posY = mouseY + (image ? image->mBounds.h / 2 : 0);
- g2->setColorAll(mForegroundColor, mForegroundColor2);
- mGuiFont->drawString(g2, str, posX, posY);
+ mGraphics->setColorAll(mForegroundColor, mForegroundColor2);
+ mGuiFont->drawString(mGraphics, str, posX, posY);
}
}
@@ -523,7 +522,7 @@ void Gui::draw()
if (mouseCursor)
{
mouseCursor->setAlpha(mMouseCursorAlpha);
- g2->drawImage2(mouseCursor, mouseX - 15, mouseY - 17);
+ mGraphics->drawImage2(mouseCursor, mouseX - 15, mouseY - 17);
}
}