Esempio n. 1
0
        protected override void OnMouseWheel(MouseEventArgs e)
        {
            base.OnMouseWheel(e);

            if (e.Delta > 0)
            {
                OnMouseWheelUpwards?.Invoke(e);
            }
            else if (e.Delta < 0)
            {
                OnMouseWheelDownwards?.Invoke(e);
            }
        }
Esempio n. 2
0
        protected override void OnMouseWheel(MouseEventArgs e)
        {
            base.OnMouseWheel(e);

            if (e.Delta > 0)
            {
                OnMouseWheelUpwards?.Invoke(e);
            }
            else if (e.Delta < 0)
            {
                OnMouseWheelDownwards?.Invoke(e);
            }

            try
            {
                if (!designMode)
                {
                    Sdl.Event evt = GetWheelEvent(e.Delta);
                    Sdl.PushEvent(out evt);
                }
            }
            catch { }
        }