示例#1
0
 private void SKControl_MouseWheel(object?sender, MouseEventArgs e)
 {
     if (e.Delta > 0)
     {
         _interactionManager.PointerZoomIn(e.X, e.Y);
     }
     else
     {
         _interactionManager.PointerZoomOut(e.X, e.Y);
     }
 }
示例#2
0
        private void SKElement_MouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
        {
            var mousePos = e.GetPosition(_gameElement);

            if (e.Delta > 0)
            {
                _interactionManager.PointerZoomIn((int)mousePos.X, (int)mousePos.Y);
            }
            else
            {
                _interactionManager.PointerZoomOut((int)mousePos.X, (int)mousePos.Y);
            }
        }