diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-02 22:14:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-02 22:14:54 +0300 |
commit | 65b614a0d142e229206fbde22a25f4a3b20b1dbc (patch) | |
tree | cb1f90dbbc8aedd3ef2dd7e2269a08b115d9fc7b /src/gui/gui.cpp | |
parent | bead0d26642bbc0c5e570306c226676c66d18b86 (diff) | |
download | manaplus-65b614a0d142e229206fbde22a25f4a3b20b1dbc.tar.gz manaplus-65b614a0d142e229206fbde22a25f4a3b20b1dbc.tar.bz2 manaplus-65b614a0d142e229206fbde22a25f4a3b20b1dbc.tar.xz manaplus-65b614a0d142e229206fbde22a25f4a3b20b1dbc.zip |
In drag and drop use ints and images but not pointer to item.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index a12163d60..95a94900a 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -435,16 +435,12 @@ void Gui::draw() && mMouseCursors && mCustomCursor && mMouseCursorAlpha > 0.0f) { Graphics *g2 = static_cast<Graphics*>(mGraphics); - Item *const item = dragDrop.getItem(); - if (item) + const Image *const image = dragDrop.getItemImage(); + if (image) { - const Image *const image = item->getImage(); - if (image) - { - const int tPosX = mouseX - (image->mBounds.w / 2); - const int tPosY = mouseY - (image->mBounds.h / 2); - g2->drawImage(image, tPosX, tPosY); - } + const int tPosX = mouseX - (image->mBounds.w / 2); + const int tPosY = mouseY - (image->mBounds.h / 2); + g2->drawImage(image, tPosX, tPosY); } Image *const mouseCursor = mMouseCursors->get(mCursorType); |