diff --git a/include/SFML/Window/Event.hpp b/include/SFML/Window/Event.hpp index d771db53..ea8d74b7 100644 --- a/include/SFML/Window/Event.hpp +++ b/include/SFML/Window/Event.hpp @@ -99,20 +99,6 @@ public: int y; //!< Y position of the mouse pointer, relative to the top of the owner window }; - //////////////////////////////////////////////////////////// - /// \brief Mouse wheel events parameters (MouseWheelMoved) - /// - /// \deprecated This event is deprecated and potentially inaccurate. - /// Use MouseWheelScrollEvent instead. - /// - //////////////////////////////////////////////////////////// - struct MouseWheelEvent - { - int delta; //!< Number of ticks the wheel has moved (positive is up, negative is down) - int x; //!< X position of the mouse pointer, relative to the left of the owner window - int y; //!< Y position of the mouse pointer, relative to the top of the owner window - }; - //////////////////////////////////////////////////////////// /// \brief Mouse wheel events parameters (MouseWheelScrolled) /// @@ -193,7 +179,6 @@ public: TextEntered, //!< A character was entered (data in event.text) KeyPressed, //!< A key was pressed (data in event.key) KeyReleased, //!< A key was released (data in event.key) - MouseWheelMoved, //!< The mouse wheel was scrolled (data in event.mouseWheel) (deprecated) MouseWheelScrolled, //!< The mouse wheel was scrolled (data in event.mouseWheelScroll) MouseButtonPressed, //!< A mouse button was pressed (data in event.mouseButton) MouseButtonReleased, //!< A mouse button was released (data in event.mouseButton) @@ -225,7 +210,6 @@ public: TextEvent text; //!< Text event parameters (Event::TextEntered) MouseMoveEvent mouseMove; //!< Mouse move event parameters (Event::MouseMoved) MouseButtonEvent mouseButton; //!< Mouse button event parameters (Event::MouseButtonPressed, Event::MouseButtonReleased) - MouseWheelEvent mouseWheel; //!< Mouse wheel event parameters (Event::MouseWheelMoved) (deprecated) MouseWheelScrollEvent mouseWheelScroll; //!< Mouse wheel event parameters (Event::MouseWheelScrolled) JoystickMoveEvent joystickMove; //!< Joystick move event parameters (Event::JoystickMoved) JoystickButtonEvent joystickButton; //!< Joystick button event parameters (Event::JoystickButtonPressed, Event::JoystickButtonReleased) diff --git a/src/SFML/Window/Android/WindowImplAndroid.cpp b/src/SFML/Window/Android/WindowImplAndroid.cpp index b4419958..e9e940a0 100644 --- a/src/SFML/Window/Android/WindowImplAndroid.cpp +++ b/src/SFML/Window/Android/WindowImplAndroid.cpp @@ -363,10 +363,11 @@ int WindowImplAndroid::processScrollEvent(AInputEvent* _event, ActivityStates& s // Create and send our mouse wheel event Event event; - event.type = Event::MouseWheelMoved; - event.mouseWheel.delta = static_cast(delta); - event.mouseWheel.x = AMotionEvent_getX(_event, 0); - event.mouseWheel.y = AMotionEvent_getY(_event, 0); + event.type = Event::MouseWheelScrolled; + event.mouseWheelScroll.wheel = Mouse::VerticalWheel; + event.mouseWheelScroll.delta = static_cast(delta); + event.mouseWheelScroll.x = AMotionEvent_getX(_event, 0); + event.mouseWheelScroll.y = AMotionEvent_getY(_event, 0); forwardEvent(event); diff --git a/src/SFML/Window/OSX/WindowImplCocoa.mm b/src/SFML/Window/OSX/WindowImplCocoa.mm index ce524ae6..6cbc2736 100644 --- a/src/SFML/Window/OSX/WindowImplCocoa.mm +++ b/src/SFML/Window/OSX/WindowImplCocoa.mm @@ -303,13 +303,6 @@ void WindowImplCocoa::mouseWheelScrolledAt(float deltaX, float deltaY, int x, in { Event event; - event.type = Event::MouseWheelMoved; - event.mouseWheel.delta = deltaY; - event.mouseWheel.x = x; - event.mouseWheel.y = y; - scaleOutXY(event.mouseWheel, m_delegate); - pushEvent(event); - event.type = Event::MouseWheelScrolled; event.mouseWheelScroll.wheel = Mouse::VerticalWheel; event.mouseWheelScroll.delta = deltaY; diff --git a/src/SFML/Window/Unix/WindowImplX11.cpp b/src/SFML/Window/Unix/WindowImplX11.cpp index ac601d84..ba5c0bb2 100644 --- a/src/SFML/Window/Unix/WindowImplX11.cpp +++ b/src/SFML/Window/Unix/WindowImplX11.cpp @@ -2036,12 +2036,6 @@ bool WindowImplX11::processEvent(XEvent& windowEvent) { Event event; - event.type = Event::MouseWheelMoved; - event.mouseWheel.delta = (button == Button4) ? 1 : -1; - event.mouseWheel.x = windowEvent.xbutton.x; - event.mouseWheel.y = windowEvent.xbutton.y; - pushEvent(event); - event.type = Event::MouseWheelScrolled; event.mouseWheelScroll.wheel = Mouse::VerticalWheel; event.mouseWheelScroll.delta = (button == Button4) ? 1 : -1; diff --git a/src/SFML/Window/Win32/WindowImplWin32.cpp b/src/SFML/Window/Win32/WindowImplWin32.cpp index 112938a7..1cb34ff9 100755 --- a/src/SFML/Window/Win32/WindowImplWin32.cpp +++ b/src/SFML/Window/Win32/WindowImplWin32.cpp @@ -769,12 +769,6 @@ void WindowImplWin32::processEvent(UINT message, WPARAM wParam, LPARAM lParam) Event event; - event.type = Event::MouseWheelMoved; - event.mouseWheel.delta = delta / 120; - event.mouseWheel.x = position.x; - event.mouseWheel.y = position.y; - pushEvent(event); - event.type = Event::MouseWheelScrolled; event.mouseWheelScroll.wheel = Mouse::VerticalWheel; event.mouseWheelScroll.delta = static_cast(delta) / 120.f;