Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        private void OnMouseWheelEvent(Silk.NET.SDL.MouseWheelEvent sdlMouseWheelEvent)
        {
            var flip = sdlMouseWheelEvent.Direction == (uint)MouseWheelDirection.MousewheelFlipped ? -1 : 1;

            MouseState.HandleMouseWheel(sdlMouseWheelEvent.Y * flip);
        }