Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    GestureConfigDrag Class

    Namespace: Stride.Input
    Assembly: Stride.Input.dll

    Configuration class for the Drag gesture.

    System.Object → GestureConfig → GestureConfigDrag
    Derived from GestureConfigDrag:

    public sealed class GestureConfigDrag : GestureConfig
    Remarks

    A drag gesture can be composed of 1 or more fingers.

    Name Description
    Constructors
    GestureConfigDrag()

    Create a default drag gesture configuration for one finger free dragging.

    GestureConfigDrag(GestureShape)

    Create a default drag gesture configuration for one finger dragging.

    Properties
    AllowedErrorMargins

    The (x,y) error margins allowed during directional dragging.

    DragShape

    The shape (direction) of the drag gesture.

    MinimumDragDistance

    Specify the minimum translation distance required before that the gesture can be recognized as a Drag.

    | Improve this Doc View Source

    Constructors


    GestureConfigDrag()

    Create a default drag gesture configuration for one finger free dragging.

    public GestureConfigDrag()

    GestureConfigDrag(GestureShape)

    Create a default drag gesture configuration for one finger dragging.

    public GestureConfigDrag(GestureShape dragShape)
    Parameters
    Type Name Description
    GestureShape dragShape

    The dragging shape

    | Improve this Doc View Source

    Properties


    AllowedErrorMargins

    The (x,y) error margins allowed during directional dragging.

    public Vector2 AllowedErrorMargins { get; set; }
    Property Value
    Type Description
    Vector2
    Remarks

    Those values are used only for directional (vertical or horizontal) dragging. Decrease those values to trigger the gesture only when the dragging is perfectly in the desired direction. Increase those values to allow directional gestures to be more approximative.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Tried to modify the configuration after it has been frozen by the system.

    System.ArgumentOutOfRangeException

    The provided x or y value was not positive.


    DragShape

    The shape (direction) of the drag gesture.

    public GestureShape DragShape { get; set; }
    Property Value
    Type Description
    GestureShape
    Exceptions
    Type Condition
    System.InvalidOperationException

    Tried to modify the configuration after it has been frozen by the system.


    MinimumDragDistance

    Specify the minimum translation distance required before that the gesture can be recognized as a Drag.

    public float MinimumDragDistance { get; set; }
    Property Value
    Type Description
    System.Single
    Remarks

    The user can reduce this value if he needs the drag gesture to be triggered even for very small drags. On the contrary, he can increase this value if he wants to avoid to deals with too small drags.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Tried to modify the configuration after it has been frozen by the system.

    System.ArgumentOutOfRangeException

    The provided value was negative.


    Inherited Members

    GestureConfig.AssociatedGestureType
    GestureConfig.RequiredNumberOfFingers

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation