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/gui.cpp | |
parent | d0c97c8a12b0904c00a492acd129aebffd7816c8 (diff) | |
download | manaplus-36027fc87b99b8f048265f6ac470227a1c32d481.tar.gz manaplus-36027fc87b99b8f048265f6ac470227a1c32d481.tar.bz2 manaplus-36027fc87b99b8f048265f6ac470227a1c32d481.tar.xz manaplus-36027fc87b99b8f048265f6ac470227a1c32d481.zip |
add option for enable/disable double click support.
New option: setup / misc / other / Enable double clicks
Diffstat (limited to 'src/guichan/gui.cpp')
-rw-r--r-- | src/guichan/gui.cpp | 43 |
1 files changed, 0 insertions, 43 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( |