WindowsMouse SetNativePosition Method Delta Engine Documentation

Namespace: DeltaEngine.Input.Windows
Assembly: DeltaEngine.Input.Windows (in DeltaEngine.Input.Windows.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public override void SetNativePosition(
	Vector2D position
)
Remarks

Tests: DeltaEngine.Input.Windows.Tests.WindowsMouseTests
Examples

1 unit tests call DeltaEngine.Input.Windows.WindowsMouse.SetNativePosition(DeltaEngine.Datatypes.Vector2D)
[Test, Ignore]
public void SetPositionAndUpdateTrigger()
{
    var setPoint = new Vector2D(0.8f, 0.4f);
    var moveTrigger = new MouseHoverTrigger();
    mouse.SetNativePosition(setPoint);
    mouse.Update(new List<Entity>(new[] { moveTrigger }));
    Assert.AreEqual(setPoint.X, moveTrigger.LastPosition.X, 0.1f);
    Assert.AreEqual(setPoint.Y, moveTrigger.LastPosition.Y, 0.1f);
}
See Also