private void OnMouseWheelEvent(object sender, MouseEventArgs mouseEventArgs) { // The mouse wheel event are still received even when the mouse cursor is out of the control boundaries. Discard the event in this case. if (!uiControl.ClientRectangle.Contains(uiControl.PointToClient(Control.MousePosition))) { return; } MouseState.HandleMouseWheel((float)mouseEventArgs.Delta / (float)SystemInformation.MouseWheelScrollDelta); }
private void OnMouseWheelEvent(SDL.SDL_MouseWheelEvent sdlMouseWheelEvent) { var flip = sdlMouseWheelEvent.direction == (uint)SDL.SDL_MouseWheelDirection.SDL_MOUSEWHEEL_FLIPPED ? -1 : 1; MouseState.HandleMouseWheel(sdlMouseWheelEvent.y * flip); }
private void OnMouseWheelEvent(Silk.NET.SDL.MouseWheelEvent sdlMouseWheelEvent) { var flip = sdlMouseWheelEvent.Direction == (uint)MouseWheelDirection.MousewheelFlipped ? -1 : 1; MouseState.HandleMouseWheel(sdlMouseWheelEvent.Y * flip); }