Class UIMouseEvent

Contains data about a UI mouse input event. This class may store data for many types of events, and some data might not be initialized for some event types. Caller must check event type before relying on the data inside.

Hierarchy

  • FrameworkObject
    • UIMouseEvent

Constructors

  • Parameters

    • OptionalisInternalConstructor: boolean

    Returns UIMouseEvent

Accessors

  • get dragStartLocalPosition(): Immutable<Vector2>
  • Returns the position where the drag was started from in local position within the bounds of the receiving element, if event is drag related.

    Returns Immutable<Vector2>

  • get dragStartLocalPositionInPixels(): Immutable<Vector2>
  • Returns the position where the drag was started from in local position within the bounds of the receiving element, if event is drag related.

    Returns Immutable<Vector2>

  • get isAltDown(): boolean
  • Checks is the alt button being held.

    Returns boolean

  • get isControlDown(): boolean
  • Checks is the control button being held.

    Returns boolean

  • get isMetaDown(): boolean
  • Checks is the meta button being held.

    Returns boolean

  • get isPlatformSpecificControlDown(): boolean
  • Checks is the platform specific control or command button being held.

    Returns boolean

    This is useful to implement platform native behaviors in a consistent way. On MacOS, most commands that would use Control (Ctrl) on Windows are handled by pressing the Command (Cmd) button.

  • get isShiftDown(): boolean
  • Checks is the shift button being held.

    Returns boolean

  • get position(): Immutable<Vector2>
  • The position of the mouse when the event happened.

    Returns Immutable<Vector2>

    The position is relative to the parent surface (typically a window) of the element this event is being sent to. The local position within the element's bounds is available via # LocalPosition.

  • get positionInPixels(): Immutable<Vector2>
  • The position of the mouse when the event happened.

    Returns Immutable<Vector2>

    The position is relative to the parent surface (typically a window) of the element this event is being sent to. The local position within the element's bounds is available via # LocalPosition.

Methods

  • Checks is the specified mouse button pressed.

    Parameters

    Returns boolean