diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-07-12 14:27:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-07-12 14:27:09 +0300 |
commit | 36027fc87b99b8f048265f6ac470227a1c32d481 (patch) | |
tree | 617b39aaf314fa9660b02fd849d994fde19f7959 /src/guichan | |
parent | d0c97c8a12b0904c00a492acd129aebffd7816c8 (diff) | |
download | manaverse-36027fc87b99b8f048265f6ac470227a1c32d481.tar.gz manaverse-36027fc87b99b8f048265f6ac470227a1c32d481.tar.bz2 manaverse-36027fc87b99b8f048265f6ac470227a1c32d481.tar.xz manaverse-36027fc87b99b8f048265f6ac470227a1c32d481.zip |
add option for enable/disable double click support.
New option: setup / misc / other / Enable double clicks
Diffstat (limited to 'src/guichan')
-rw-r--r-- | src/guichan/gui.cpp | 43 | ||||
-rw-r--r-- | src/guichan/include/guichan/gui.hpp | 8 |
2 files changed, 0 insertions, 51 deletions
diff --git a/src/guichan/gui.cpp b/src/guichan/gui.cpp index fcfe58bef..4ba60089a 100644 --- a/src/guichan/gui.cpp +++ b/src/guichan/gui.cpp @@ -337,49 +337,6 @@ namespace gcn } } - void Gui::handleMousePressed(const MouseInput& mouseInput) - { - Widget* sourceWidget = getMouseEventSource( - mouseInput.getX(), mouseInput.getY()); - - if (mFocusHandler->getDraggedWidget()) - sourceWidget = mFocusHandler->getDraggedWidget(); - - int sourceWidgetX, sourceWidgetY; - sourceWidget->getAbsolutePosition(sourceWidgetX, sourceWidgetY); - - if ((mFocusHandler->getModalFocused() - && sourceWidget->isModalFocused()) - || !mFocusHandler->getModalFocused()) - { - sourceWidget->requestFocus(); - } - - if (mouseInput.getTimeStamp() - mLastMousePressTimeStamp < 250 - && mLastMousePressButton == mouseInput.getButton()) - { - mClickCount++; - } - else - { - mClickCount = 1; - } - - distributeMouseEvent(sourceWidget, - MouseEvent::PRESSED, - mouseInput.getButton(), - mouseInput.getX(), - mouseInput.getY()); - - mFocusHandler->setLastWidgetPressed(sourceWidget); - - mFocusHandler->setDraggedWidget(sourceWidget); - mLastMouseDragButton = mouseInput.getButton(); - - mLastMousePressButton = mouseInput.getButton(); - mLastMousePressTimeStamp = mouseInput.getTimeStamp(); - } - void Gui::handleMouseWheelMovedDown(const MouseInput& mouseInput) { Widget* sourceWidget = getMouseEventSource( diff --git a/src/guichan/include/guichan/gui.hpp b/src/guichan/include/guichan/gui.hpp index 3a30dedd0..d42a11255 100644 --- a/src/guichan/include/guichan/gui.hpp +++ b/src/guichan/include/guichan/gui.hpp @@ -265,14 +265,6 @@ namespace gcn virtual void handleMouseMoved(const MouseInput& mouseInput); /** - * Handles mouse pressed input. - * - * @param mouseInput The mouse input to handle. - * @since 0.6.0 - */ - virtual void handleMousePressed(const MouseInput& mouseInput); - - /** * * Handles mouse wheel moved down input. * |