MouseDragTriggerTests DragMouseHorizontalToCreateRectangles 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 DragMouseHorizontalToCreateRectangles()
Examples

[Test]
public void DragMouseHorizontalToCreateRectangles()
{
    var rectangle = new FilledRect(Rectangle.Unused, Color.GetRandomColor());
    //ncrunch: no coverage start 
    new Command((start, end, done) =>
    {
        rectangle.DrawArea = new Rectangle(start.X, start.Y - 0.01f, end.X - start.X, 0.02f);
        if (done)
            rectangle = new FilledRect(Rectangle.Unused, Color.GetRandomColor());
    }).Add(new MouseDragTrigger(MouseButton.Left, DragDirection.Horizontal));
    //ncrunch: no coverage end
}
See Also