summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-02 16:13:36 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-03 21:50:05 +0300
commitf651273ebf2a8b11aa01ed1434ecb613177ced6a (patch)
treec51d2bed1476270e27ad95c5a46e15af32eaccdd /src/gui/gui.cpp
parent30846b7f68f1ad05a0719ae37f75fd2901a6545a (diff)
downloadmv-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.gz
mv-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.bz2
mv-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.xz
mv-f651273ebf2a8b11aa01ed1434ecb613177ced6a.zip
Add gui mode for dyecmd. Now only basic code added.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 382cd42bf..a7e14983e 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -73,7 +73,11 @@
#include "gui/widgets/window.h"
+#ifndef DYECMD
#include "dragdrop.h"
+#else
+#include "resources/image.h"
+#endif
#include "settings.h"
#include "touchmanager.h"
@@ -477,6 +481,7 @@ void Gui::draw()
if ((settings.mouseFocused || button & SDL_BUTTON(1))
&& mMouseCursors && mCustomCursor && mMouseCursorAlpha > 0.0F)
{
+#ifndef DYECMD
const Image *const image = dragDrop.getItemImage();
if (mGuiFont)
{
@@ -497,6 +502,7 @@ void Gui::draw()
const int posY = mouseY - (image->mBounds.h / 2);
mGraphics->drawImage(image, posX, posY);
}
+#endif
Image *const mouseCursor = mMouseCursors->get(
static_cast<int>(mCursorType));
if (mouseCursor)
@@ -906,9 +912,10 @@ void Gui::distributeMouseEvent(Widget *const source,
widget = parent;
parent = swap->getParent();
+#ifndef DYECMD
if (type == MouseEventType::RELEASED)
dragDrop.clear();
-
+#endif
if (!widget || event.isConsumed())
break;