Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ScrollingView

[21:7] extends: Parent, View

Wraps FXGL's ScrollingView (com.almasb.fxgl.texture.ScrollingView), a Parent Node that renders a wrap-around image scrolled horizontally or vertically. Standard side-scroller background primitive: set the image and the orientation, then drive scrollX (or scrollY) every frame. Java extends javafx.scene.Parent and implements the FXGL View interface; the Aussom wrapper mirrors that with multi-inheritance so callers get the JavaFX Parent / Node surface alongside the View contract.

Methods

  • ScrollingView (object ImageObj, double ViewWidth = -1.0, double ViewHeight = -1.0, string OrientationName = "HORIZONTAL")

    Creates a new ScrollingView.

    • @p ImageObj is a fx.Image wrapper for the full background image.
    • @p ViewWidth is the view's pixel width (defaults to image width when -1).
    • @p ViewHeight is the view's pixel height (defaults to image height when -1).
    • @p OrientationName is "HORIZONTAL" or "VERTICAL".
  • getOrientation ()

    Returns the orientation enum AJO.

  • getScrollX ()

    Returns the current X scroll offset (semantic; may be negative — internal pixel offset wraps).

    • @r A double.
  • setScrollX (double X)

    Sets the X scroll offset. The view redraws immediately.

    • @p X is the new scroll value.
    • @r this object
  • getScrollY ()

    Returns the current Y scroll offset.

  • setScrollY (double Y)

    Sets the Y scroll offset.

    • @p Y is the new scroll value.
    • @r this object
  • onUpdate (double Tpf)

    No-op tick (kept for the View contract).

  • dispose ()

    Disposes view resources.