Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: MouseEventData

[13:7] extends: FxObj

Wraps FXGL's MouseEventData (com.almasb.fxgl.input.MouseEventData), the FXGL-specific wrapper around a JavaFX MouseEvent that adds scene-scale and viewport context. Returned by FXGL's mouse-event subscribers (e.g. Input.addEventFilter for FXGL mouse events).

Methods

  • MouseEventData ()

    Empty default constructor; populated by adopt.

  • adopt (object Ajo)

    Wraps an existing MouseEventData AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a MouseEventData.
    • @r A new wrapper.
  • getEvent ()

    Returns the underlying JavaFX MouseEvent.

    • @r An AussomJavaObject around a javafx.scene.input.MouseEvent.
  • getContentRootTranslation ()

    Returns the content-root translation Point2D applied by FXGL at event time.

    • @r An AussomJavaObject around a Point2D.
  • getViewportOrigin ()

    Returns the viewport origin Point2D at event time.

    • @r An AussomJavaObject around a Point2D.
  • getViewportZoom ()

    Returns the viewport zoom factor at event time.

    • @r A double.
  • getScaleRatioX ()

    Returns the X axis scale ratio at event time.

    • @r A double.
  • getScaleRatioY ()

    Returns the Y axis scale ratio at event time.

    • @r A double.