Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    PointerEvent Class

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

    A pointer event.

    System.Object → InputEvent → PointerEvent
    Derived from PointerEvent:

    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()
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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
    Overrides
    System.Object.ToString()

    Inherited Members

    InputEvent.Device

    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