diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-09-23 22:01:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-09-23 22:01:44 +0300 |
commit | 3c404128c4669a1f4f190e20a89553677717fc50 (patch) | |
tree | 2db4e5031089c800c4e00fd6244e578f44a7c910 /src/gui/widgets/textfield.cpp | |
parent | 89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff) | |
download | mv-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz mv-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2 mv-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz mv-3c404128c4669a1f4f190e20a89553677717fc50.zip |
Add missing comments into defines.
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r-- | src/gui/widgets/textfield.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index b80e21eeb..13fddb119 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -312,7 +312,8 @@ void TextField::keyPressed(KeyEvent &event) return; } bool consumed(false); -#else +#else // USE_SDL2 + if (val >= 32) { if (mNumeric) @@ -375,7 +376,7 @@ void TextField::keyPressed(KeyEvent &event) mLastEventPaste = 0; bool consumed(false); -#endif +#endif // USE_SDL2 const InputActionT action = event.getActionId(); if (!inputManager.isActionActive(InputAction::GUI_CTRL)) @@ -562,13 +563,15 @@ void TextField::handleCtrlKeys(const InputActionT action, bool &consumed) { #ifdef USE_SDL2 handlePaste(); -#else +#else // USE_SDL2 + // hack to prevent paste key sticking if (mLastEventPaste && mLastEventPaste > cur_time) break; handlePaste(); mLastEventPaste = cur_time + 2; -#endif +#endif // USE_SDL2 + consumed = true; break; } @@ -762,14 +765,15 @@ void TextField::mousePressed(MouseEvent &event) #ifdef ANDROID if (!WindowManager::isKeyboardVisible()) inputManager.executeAction(InputAction::SHOW_KEYBOARD); -#endif +#endif // ANDROID + event.consume(); if (event.getButton() == MouseButton::RIGHT) { #ifndef DYECMD if (popupMenu) popupMenu->showTextFieldPopup(this); -#endif +#endif // DYECMD } else if (event.getButton() == MouseButton::LEFT) { @@ -784,7 +788,7 @@ void TextField::focusGained(const Event &event A_UNUSED) #ifdef ANDROID if (!WindowManager::isKeyboardVisible()) inputManager.executeAction(InputAction::SHOW_KEYBOARD); -#endif +#endif // ANDROID } void TextField::focusLost(const Event &event A_UNUSED) |