Mouse Position Property Delta Engine Documentation

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

public Vector2D Position { get; protected set; }

Property Value

Type: Vector2D
Remarks

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

1 unit tests call DeltaEngine.Input.Mouse.Position
[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