summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-22 15:55:34 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-22 15:55:34 +0300
commit04f47f060f94ec0e2dfc3cccf62cff167e0ecd68 (patch)
tree206bd9f2fa3ea57c74c143aa06deddf44d6d0bea /src/gui/gui.cpp
parent60ae9c1b34a6fe98dfde22e38ec95e65d7cdcf1c (diff)
downloadManaVerse-04f47f060f94ec0e2dfc3cccf62cff167e0ecd68.tar.gz
ManaVerse-04f47f060f94ec0e2dfc3cccf62cff167e0ecd68.tar.bz2
ManaVerse-04f47f060f94ec0e2dfc3cccf62cff167e0ecd68.tar.xz
ManaVerse-04f47f060f94ec0e2dfc3cccf62cff167e0ecd68.zip
Reoder some text and image drawing for better batching.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 17ad60ac0..779bec99c 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -467,12 +467,6 @@ void Gui::draw()
&& mMouseCursors && mCustomCursor && mMouseCursorAlpha > 0.0F)
{
const Image *const image = dragDrop.getItemImage();
- if (image)
- {
- const int posX = mouseX - (image->mBounds.w / 2);
- const int posY = mouseY - (image->mBounds.h / 2);
- mGraphics->drawImage(image, posX, posY);
- }
if (mGuiFont)
{
const std::string &str = dragDrop.getText();
@@ -484,7 +478,12 @@ void Gui::draw()
mGuiFont->drawString(mGraphics, str, posX, posY);
}
}
-
+ if (image)
+ {
+ const int posX = mouseX - (image->mBounds.w / 2);
+ const int posY = mouseY - (image->mBounds.h / 2);
+ mGraphics->drawImage(image, posX, posY);
+ }
Image *const mouseCursor = mMouseCursors->get(mCursorType);
if (mouseCursor)
{