TouchDualDragTrigger ClassDelta Engine Documentation
Allows a touch dual drag to be detected. View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Entities Entity
    DeltaEngine.Commands Trigger
      DeltaEngine.Commands InputTrigger
        DeltaEngine.Commands DragTrigger
          DeltaEngine.Input TouchDualDragTrigger

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

public class TouchDualDragTrigger : DragTrigger, 
	TouchTrigger

The TouchDualDragTrigger type exposes the following members.

Constructors

  NameDescription
Public methodTouchDualDragTrigger(Dictionary String, String )
Initializes a new instance of the TouchDualDragTrigger class
Public methodTouchDualDragTrigger(DragDirection)
Initializes a new instance of the TouchDualDragTrigger class
Top
Methods

  NameDescription
Public methodAdd T  (Inherited from Entity.)
Public methodAddTag (Inherited from Entity.)
Public methodClearTags (Inherited from Entity.)
Public methodContains T  (Inherited from Entity.)
Public methodContainsBehavior T  (Inherited from Entity.)
Public methodContainsTag (Inherited from Entity.)
Protected methodDeactivate (Inherited from Entity.)
Public methodDispose (Inherited from Entity.)
Public methodGet T 
Gets a specific component, derived classes can return faster cached values (e.g. Entity2D) View code on GitHub
(Inherited from Entity.)
Protected methodGetActiveBehaviors (Inherited from Entity.)
Protected methodGetComponentsForSaving (Inherited from Entity.)
Public methodGetOrDefault T  (Inherited from Entity.)
Public methodGetTags (Inherited from Entity.)
Public methodHandleWithTouch
Public methodInvoke (Inherited from Trigger.)
Protected methodIsDragDirectionCorrect (Inherited from DragTrigger.)
Public methodRemove T  (Inherited from Entity.)
Public methodRemoveTag (Inherited from Entity.)
Public methodSet (Inherited from Entity.)
Public methodSetComponents (Inherited from Entity.)
Public methodStart T  (Inherited from Entity.)
Protected methodStartInputDevice (Overrides InputTrigger StartInputDevice .)
Public methodStop T  (Inherited from Entity.)
Public methodToString (Inherited from Entity.)
Public methodUpdate (Inherited from Trigger.)
Top
Fields

  NameDescription
Protected fieldcomponents (Inherited from Entity.)
Public fieldInvoked (Inherited from Trigger.)
Top
Properties

  NameDescription
Public propertyDirection (Inherited from DragTrigger.)
Public propertyDoneDragging (Inherited from DragTrigger.)
Public propertyIsActive (Inherited from Entity.)
Public propertyIsPauseable (Inherited from Trigger.)
Public propertyMovement (Inherited from DragTrigger.)
Public propertyNumberOfComponents (Inherited from Entity.)
Public propertySecondPosition
Public propertySecondStartPosition
Public propertyStartPosition (Inherited from DragTrigger.)
Public propertyUpdatePriority (Inherited from Entity.)
Public propertyWasInvokedThisTick (Inherited from Trigger.)
Top
Remarks

Tests: DeltaEngine.Input.Tests.TouchDualDragTriggerTests
Examples

3 unit tests call DeltaEngine.Input.TouchDualDragTrigger
[Test]
public void DragTouchToCreateRectangles()
{
    MouseDragTriggerTests.DragToCreateRectangles(new TouchDualDragTrigger());
}
[Test, CloseAfterFirstFrame]
public void DragTouch()
{
    var touch = Resolve<Touch>() as MockTouch;
    if (touch == null)
        return; //ncrunch: no coverage 
    bool isFinished = false;
    new Command((start, end, done) => isFinished = done).Add(new TouchDualDragTrigger());
    SetTouchState(touch, State.Pressing, Vector2D.Zero);
    SetTouchState(touch, State.Pressed, Vector2D.One);
    SetTouchState(touch, State.Releasing, Vector2D.One);
    Assert.IsTrue(isFinished);
}
[Test, CloseAfterFirstFrame]
public void Create()
{
    var trigger = new TouchDualDragTrigger();
    Assert.AreEqual(DragDirection.Free, trigger.Direction);
    trigger =
        new TouchDualDragTrigger(new Dictionary<string, string> { { "Direction", "Horizontal" } });
See Also