diff options
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 d363bdc9b..fcfe58bef 100644 --- a/src/guichan/gui.cpp +++ b/src/guichan/gui.cpp @@ -416,49 +416,6 @@ namespace gcn mouseInput.getY()); } - void Gui::handleMouseReleased(const MouseInput& mouseInput) - { - Widget* sourceWidget = getMouseEventSource( - mouseInput.getX(), mouseInput.getY()); - - if (mFocusHandler->getDraggedWidget()) - { - if (sourceWidget != mFocusHandler->getLastWidgetPressed()) - mFocusHandler->setLastWidgetPressed(nullptr); - - sourceWidget = mFocusHandler->getDraggedWidget(); - } - - int sourceWidgetX, sourceWidgetY; - sourceWidget->getAbsolutePosition(sourceWidgetX, sourceWidgetY); - - distributeMouseEvent(sourceWidget, - MouseEvent::RELEASED, - mouseInput.getButton(), - mouseInput.getX(), - mouseInput.getY()); - - if (mouseInput.getButton() == mLastMousePressButton - && mFocusHandler->getLastWidgetPressed() == sourceWidget) - { - distributeMouseEvent(sourceWidget, - MouseEvent::CLICKED, - mouseInput.getButton(), - mouseInput.getX(), - mouseInput.getY()); - - mFocusHandler->setLastWidgetPressed(nullptr); - } - else - { - mLastMousePressButton = 0; - mClickCount = 0; - } - - if (mFocusHandler->getDraggedWidget()) - mFocusHandler->setDraggedWidget(nullptr); - } - Widget* Gui::getWidgetAt(int x, int y) { // If the widget's parent has no child then we have found the widget.. diff --git a/src/guichan/include/guichan/gui.hpp b/src/guichan/include/guichan/gui.hpp index ea952ec9c..3a30dedd0 100644 --- a/src/guichan/include/guichan/gui.hpp +++ b/src/guichan/include/guichan/gui.hpp @@ -290,14 +290,6 @@ namespace gcn virtual void handleMouseWheelMovedUp(const MouseInput& mouseInput); /** - * Handles mouse released input. - * - * @param mouseInput The mouse input to handle. - * @since 0.6.0 - */ - virtual void handleMouseReleased(const MouseInput& mouseInput); - - /** * Handles modal focus. Modal focus needs to be checked at * each logic iteration as it might be necessary to distribute * mouse entered or mouse exited events. |