PointerEvent Class
Namespace: Stride.InputAssembly: Stride.Input.dll
A pointer event.
public class PointerEvent : InputEvent, IInputEventArgs
Name | Description | |
---|---|---|
Properties | ||
AbsoluteDeltaPosition | Gets the absolute delta position of the pointer since the previous frame. |
|
AbsolutePosition | Gets the absolute screen position of the pointer. |
|
DeltaPosition | Gets the delta position of the pointer since the previous frame. |
|
DeltaTime | Gets the amount of time since the previous state. |
|
EventType | Gets the type of pointer event (pressed,released,etc.) |
|
IsDown | Gets if the pointer is down, useful for filtering out move events that are not placed between drags |
|
Pointer | The pointer that sent this event |
|
PointerId | Gets a unique identifier of the pointer. See remarks. |
|
Position | Gets the normalized screen position of the pointer. |
|
Methods | ||
Clone() | Clones the pointer event, this is useful if you intend to use it after this frame, since otherwise it would be recycled by the input manager the next frame |
|
ToString() |
Properties
AbsoluteDeltaPosition
Gets the absolute delta position of the pointer since the previous frame.
public Vector2 AbsoluteDeltaPosition { get; }
Property Value
Type | Description |
---|---|
Vector2 | The absolute delta position. |
AbsolutePosition
Gets the absolute screen position of the pointer.
public Vector2 AbsolutePosition { get; }
Property Value
Type | Description |
---|---|
Vector2 | The absolute delta position. |
DeltaPosition
Gets the delta position of the pointer since the previous frame.
public Vector2 DeltaPosition { get; }
Property Value
Type | Description |
---|---|
Vector2 | The delta position. |
DeltaTime
Gets the amount of time since the previous state.
public TimeSpan DeltaTime { get; }
Property Value
Type | Description |
---|---|
System.TimeSpan | The delta time. |
EventType
Gets the type of pointer event (pressed,released,etc.)
public PointerEventType EventType { get; }
Property Value
Type | Description |
---|---|
PointerEventType | The state. |
IsDown
Gets if the pointer is down, useful for filtering out move events that are not placed between drags
public bool IsDown { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Pointer
The pointer that sent this event
public IPointerDevice Pointer { get; }
Property Value
Type | Description |
---|---|
IPointerDevice |
PointerId
Gets a unique identifier of the pointer. See remarks.
public int PointerId { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The pointer id. |
Remarks
The default mouse pointer will always be affected to the PointerId 0. On a tablet, a pen or each fingers will get a unique identifier.
Position
Gets the normalized screen position of the pointer.
public Vector2 Position { get; }
Property Value
Type | Description |
---|---|
Vector2 | The position. |
Methods
Clone()
Clones the pointer event, this is useful if you intend to use it after this frame, since otherwise it would be recycled by the input manager the next frame
public PointerEvent Clone()
Returns
Type | Description |
---|---|
PointerEvent | The cloned event |
ToString()
public override string ToString()
Returns
Type | Description |
---|---|
System.String |