TouchEventArgs Class
Namespace: Stride.UIAssembly: Stride.UI.dll
Provides data for touch input events.
public class TouchEventArgs : RoutedEventArgs
Name | Description | |
---|---|---|
Properties | ||
Action | Gets the action that occurred. |
|
ScreenPosition | Gets the position of the touch on the screen. Position is normalized between [0,1]. (0,0) is the left top corner, (1,1) is the right bottom corner. |
|
ScreenTranslation | Gets the translation of the touch on the screen since last triggered event (in normalized units). (1,1) represent a translation of the top left corner to the bottom right corner. |
|
Timestamp | Gets the time when this event occurred. |
|
WorldPosition | Gets the position of the touch in the UI virtual world space. |
|
WorldTranslation | Gets the translation of the touch in the UI virtual world space. |
Properties
Action
Gets the action that occurred.
public TouchAction Action { get; }
Property Value
Type | Description |
---|---|
TouchAction |
ScreenPosition
Gets the position of the touch on the screen. Position is normalized between [0,1]. (0,0) is the left top corner, (1,1) is the right bottom corner.
public Vector2 ScreenPosition { get; }
Property Value
Type | Description |
---|---|
Vector2 |
ScreenTranslation
Gets the translation of the touch on the screen since last triggered event (in normalized units). (1,1) represent a translation of the top left corner to the bottom right corner.
public Vector2 ScreenTranslation { get; }
Property Value
Type | Description |
---|---|
Vector2 |
Timestamp
Gets the time when this event occurred.
public TimeSpan Timestamp { get; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
WorldPosition
Gets the position of the touch in the UI virtual world space.
public Vector3 WorldPosition { get; }
Property Value
Type | Description |
---|---|
Vector3 |
WorldTranslation
Gets the translation of the touch in the UI virtual world space.
public Vector3 WorldTranslation { get; }
Property Value
Type | Description |
---|---|
Vector3 |