From 4e596c5929ff5b773caeda3fcf0de9ca89602b37 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 31 May 2013 23:59:16 +0300 Subject: Change mouserelease gui function. --- src/guichan/gui.cpp | 43 ------------------------------------------- 1 file changed, 43 deletions(-) (limited to 'src/guichan/gui.cpp') 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.. -- cgit v1.2.3-70-g09d2