TouchDragTriggerTests DragTouchHorizontal Method Delta Engine Documentation

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

public void DragTouchHorizontal()
Examples

[Test, CloseAfterFirstFrame]
public void DragTouchHorizontal()
{
    if (touch == null)
        return; //ncrunch: no coverage 
    bool isFinished = false;
    new Command((start, end, done) => isFinished = done).Add(
        new TouchDragTrigger(DragDirection.Horizontal));
    SetTouchState(State.Pressing, Vector2D.Zero);
    SetTouchState(State.Pressed, new Vector2D(1,0));
    SetTouchState(State.Releasing, new Vector2D(1,0));
    Assert.IsTrue(isFinished);
}
See Also