Remove 'MouseWheelEvent' and adjust usages
This commit is contained in:
parent
d12a2cd319
commit
21d594a765
@ -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)
|
||||
|
@ -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<double>(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<double>(delta);
|
||||
event.mouseWheelScroll.x = AMotionEvent_getX(_event, 0);
|
||||
event.mouseWheelScroll.y = AMotionEvent_getY(_event, 0);
|
||||
|
||||
forwardEvent(event);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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<float>(delta) / 120.f;
|
||||
|
Loading…
Reference in New Issue
Block a user