summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
commit3c404128c4669a1f4f190e20a89553677717fc50 (patch)
tree2db4e5031089c800c4e00fd6244e578f44a7c910 /src/gui/gui.cpp
parent89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff)
downloadplus-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz
plus-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2
plus-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz
plus-3c404128c4669a1f4f190e20a89553677717fc50.zip
Add missing comments into defines.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 17c3558ae..c4c6a1794 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -78,9 +78,9 @@
#ifndef DYECMD
#include "dragdrop.h"
-#else
+#else // DYECMD
#include "resources/image/image.h"
-#endif
+#endif // DYECMD
#include "settings.h"
#include "listeners/focuslistener.h"
@@ -135,7 +135,7 @@ Gui::Gui() :
#ifdef ANDROID
mLastMouseRealX(0),
mLastMouseRealY(0),
-#endif
+#endif // ANDROID
mFocusListeners(),
mForegroundColor(theme->getColor(ThemeColorId::TEXT, 255)),
mForegroundColor2(theme->getColor(ThemeColorId::TEXT_OUTLINE, 255)),
@@ -408,7 +408,7 @@ bool Gui::handleKeyInput()
#ifdef USE_SDL2
if (!keyInput.getText().empty())
eventToGlobalKeyListeners.setText(keyInput.getText());
-#endif
+#endif // USE_SDL2
distributeKeyEventToGlobalKeyListeners(
eventToGlobalKeyListeners);
@@ -434,7 +434,7 @@ bool Gui::handleKeyInput()
#ifdef USE_SDL2
if (!keyInput.getText().empty())
event.setText(keyInput.getText());
-#endif
+#endif // USE_SDL2
if (!mFocusHandler->getFocused()->isFocusable())
mFocusHandler->focusNone();
@@ -511,7 +511,8 @@ void Gui::draw()
const int posY = mouseY - (image->mBounds.h / 2);
mGraphics->drawImage(image, posX, posY);
}
-#endif
+#endif // DYECMD
+
Image *const mouseCursor = mMouseCursors->get(
CAST_SIZE(mCursorType));
if (mouseCursor)
@@ -927,7 +928,8 @@ void Gui::distributeMouseEvent(Widget *const source,
#ifndef DYECMD
if (type == MouseEventType::RELEASED)
dragDrop.clear();
-#endif
+#endif // DYECMD
+
if (!widget || event.isConsumed())
break;
@@ -1005,8 +1007,9 @@ void Gui::handleMouseInput()
#ifndef USE_SDL2
SDL_WarpMouse(mLastMouseX, mLastMouseY,
mLastMouseRealX, mLastMouseRealY);
-#endif
-#endif
+#endif // USE_SDL2
+#endif // ANDROID
+
mMouseInactivityTimer = 0;
continue;
}
@@ -1018,7 +1021,8 @@ void Gui::handleMouseInput()
#ifdef ANDROID
mLastMouseRealX = mouseInput.getRealX();
mLastMouseRealY = mouseInput.getRealY();
-#endif
+#endif // ANDROID
+
switch (mouseInput.getType())
{
case MouseEventType::PRESSED: