ModifyMouseState
Introduction
Code Example
FlatRedBall.Input.Mouse.ModifyMouseState += HandleModifyMouseState;private void HandleModifyMouseState(ref Microsoft.Xna.Framework.Input.MouseState mouseState)
{
var point = Control.MousePosition;
var screen = mFrbControl.PointFromScreen(new System.Windows.Point(point.X, point.Y));
var newMouseState = new Microsoft.Xna.Framework.Input.MouseState(
MathFunctions.RoundToInt(screen.X),
MathFunctions.RoundToInt(screen.Y),
mouseState.ScrollWheelValue,
mouseState.LeftButton,
mouseState.MiddleButton,
mouseState.RightButton,
mouseState.XButton1,
mouseState.XButton2);
mouseState = newMouseState;
}Last updated
Was this helpful?