예제 #1
0
        //public float WheelDelta { get; set; }

        internal MouseButtonArgs(Vector2 oldPosition, Vector2 position, MouseButtonEventArgs e)
        {
            OldPositionNDC = oldPosition;
            PositionNDC    = position;

            OldPixelPosition = AxMath.MapFromNDC(OldPositionNDC, Application.Current.ScreenPixelSize);
            PixelPosition    = AxMath.MapFromNDC(PositionNDC, Application.Current.ScreenPixelSize);

            Button    = e.Button;
            Action    = e.Action;
            Modifiers = e.Modifiers;
            IsPressed = e.IsPressed;

            Position    = PixelPosition * SceneContext.Current.ScreenScale;
            OldPosition = OldPixelPosition * SceneContext.Current.ScreenScale;
        }