diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-12-23 20:24:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-12-23 20:24:55 +0300 |
commit | 9c9a1a4a4e2af42246f56aa73a5212ece9af9493 (patch) | |
tree | 4298adee937bc581b910d69456effc716ddd1311 /src | |
parent | 5fc7ef5ed9394e613341cd4f98d908bb8483b2fd (diff) | |
download | manaverse-9c9a1a4a4e2af42246f56aa73a5212ece9af9493.tar.gz manaverse-9c9a1a4a4e2af42246f56aa73a5212ece9af9493.tar.bz2 manaverse-9c9a1a4a4e2af42246f56aa73a5212ece9af9493.tar.xz manaverse-9c9a1a4a4e2af42246f56aa73a5212ece9af9493.zip |
Remove default parameters from gui.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/gui.cpp | 132 | ||||
-rw-r--r-- | src/gui/gui.h | 4 |
2 files changed, 78 insertions, 58 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index f87b8796f..493886e3d 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -608,12 +608,12 @@ void Gui::handleMouseMoved(const MouseInput &mouseInput) if (Widget::widgetExists(widget)) { distributeMouseEvent(widget, - MouseEventType::EXITED, - mouseInput.getButton(), - mouseInput.getX(), - mouseInput.getY(), - true, - true); + MouseEventType::EXITED, + mouseInput.getButton(), + mouseInput.getX(), + mouseInput.getY(), + true, + true); } mWidgetWithMouseQueue.pop_front(); @@ -660,12 +660,12 @@ void Gui::handleMouseMoved(const MouseInput &mouseInput) || !widget->isVisible()) { distributeMouseEvent(widget, - MouseEventType::EXITED, - button, - mouseX, - mouseY, - true, - true); + MouseEventType::EXITED, + button, + mouseX, + mouseY, + true, + true); mClickCount = 1; mLastMousePressTimeStamp = 0U; mWidgetWithMouseQueue.erase(iter); @@ -731,12 +731,12 @@ void Gui::handleMouseMoved(const MouseInput &mouseInput) && Widget::widgetExists(widget)) { distributeMouseEvent(widget, - MouseEventType::ENTERED, - button, - mouseX, - mouseY, - true, - true); + MouseEventType::ENTERED, + button, + mouseX, + mouseY, + true, + true); mWidgetWithMouseQueue.push_front(widget); } @@ -748,19 +748,23 @@ void Gui::handleMouseMoved(const MouseInput &mouseInput) if (mFocusHandler->getDraggedWidget() != nullptr) { distributeMouseEvent(mFocusHandler->getDraggedWidget(), - MouseEventType::DRAGGED, - mLastMouseDragButton, - mouseX, - mouseY); + MouseEventType::DRAGGED, + mLastMouseDragButton, + mouseX, + mouseY, + false, + false); } else { Widget *const sourceWidget = getMouseEventSource(mouseX, mouseY); distributeMouseEvent(sourceWidget, - MouseEventType::MOVED, - button, - mouseX, - mouseY); + MouseEventType::MOVED, + button, + mouseX, + mouseY, + false, + false); } mMouseInactivityTimer = 0; } @@ -801,7 +805,13 @@ void Gui::handleMousePressed(const MouseInput &mouseInput) mClickCount = 1; } - distributeMouseEvent(sourceWidget, MouseEventType::PRESSED, button, x, y); + distributeMouseEvent(sourceWidget, + MouseEventType::PRESSED, + button, + x, + y, + false, + false); mFocusHandler->setLastWidgetPressed(sourceWidget); mFocusHandler->setDraggedWidget(sourceWidget); mLastMouseDragButton = button; @@ -1087,7 +1097,9 @@ void Gui::handleMouseReleased(const MouseInput &mouseInput) MouseEventType::RELEASED2, mouseInput.getButton(), mouseInput.getX(), - mouseInput.getY()); + mouseInput.getY(), + false, + false); } } @@ -1095,19 +1107,23 @@ void Gui::handleMouseReleased(const MouseInput &mouseInput) return; sourceWidget->getAbsolutePosition(sourceWidgetX, sourceWidgetY); distributeMouseEvent(sourceWidget, - MouseEventType::RELEASED, - mouseInput.getButton(), - mouseInput.getX(), - mouseInput.getY()); + MouseEventType::RELEASED, + mouseInput.getButton(), + mouseInput.getX(), + mouseInput.getY(), + false, + false); if (mouseInput.getButton() == mLastMousePressButton && mFocusHandler->getLastWidgetPressed() == sourceWidget) { distributeMouseEvent(sourceWidget, - MouseEventType::CLICKED, - mouseInput.getButton(), - mouseInput.getX(), - mouseInput.getY()); + MouseEventType::CLICKED, + mouseInput.getButton(), + mouseInput.getX(), + mouseInput.getY(), + false, + false); mFocusHandler->setLastWidgetPressed(nullptr); } @@ -1214,10 +1230,12 @@ void Gui::handleMouseWheelMovedDown(const MouseInput& mouseInput) sourceWidget->getAbsolutePosition(sourceWidgetX, sourceWidgetY); distributeMouseEvent(sourceWidget, - MouseEventType::WHEEL_MOVED_DOWN, - mouseInput.getButton(), - mouseInput.getX(), - mouseInput.getY()); + MouseEventType::WHEEL_MOVED_DOWN, + mouseInput.getButton(), + mouseInput.getX(), + mouseInput.getY(), + false, + false); } } @@ -1236,10 +1254,12 @@ void Gui::handleMouseWheelMovedUp(const MouseInput& mouseInput) sourceWidget->getAbsolutePosition(sourceWidgetX, sourceWidgetY); distributeMouseEvent(sourceWidget, - MouseEventType::WHEEL_MOVED_UP, - mouseInput.getButton(), - mouseInput.getX(), - mouseInput.getY()); + MouseEventType::WHEEL_MOVED_UP, + mouseInput.getButton(), + mouseInput.getX(), + mouseInput.getY(), + false, + false); } } @@ -1443,12 +1463,12 @@ void Gui::handleModalFocusGained() if (Widget::widgetExists(widget)) { distributeMouseEvent(widget, - MouseEventType::EXITED, - mLastMousePressButton, - mLastMouseX, - mLastMouseY, - true, - true); + MouseEventType::EXITED, + mLastMousePressButton, + mLastMouseX, + mLastMouseY, + true, + true); } mWidgetWithMouseQueue.pop_front(); @@ -1489,12 +1509,12 @@ void Gui::handleModalFocusReleased() if (!widgetIsPresentInQueue && Widget::widgetExists(widget)) { distributeMouseEvent(widget, - MouseEventType::ENTERED, - mLastMousePressButton, - mLastMouseX, - mLastMouseY, - false, - true); + MouseEventType::ENTERED, + mLastMousePressButton, + mLastMouseX, + mLastMouseY, + false, + true); mWidgetWithMouseQueue.push_front(widget); } diff --git a/src/gui/gui.h b/src/gui/gui.h index a846f1a5d..1384181f4 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -323,8 +323,8 @@ class Gui final const MouseEventTypeT type, const MouseButtonT button, const int x, const int y, - const bool force = false, - const bool toSourceOnly = false); + const bool force, + const bool toSourceOnly); /** * |