GestureConfigDrag Class
Namespace: Stride.InputAssembly: Stride.Input.dll
Configuration class for the Drag gesture.
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. |
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 |
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. |