Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: UI

[13:7] extends: FxObj

Wraps FXGL's UI (com.almasb.fxgl.ui.UI), the pairing of a loaded JavaFX root Parent with its UIController. Typically built by the asset loader from an FXML resource; this wrapper exists for code that constructs a UI directly.

Methods

  • UI (object RootNodeAjo = null, object ControllerAjo = null)

    Creates a new UI around the given root Parent and UIController. Pass AussomJavaObjects around the underlying javafx.scene.Parent and a UIController implementation (for example, an AussomUIController obtained via the UIController wrapper).

    • @p RootNodeAjo is an AussomJavaObject around a javafx.scene.Parent.
    • @p ControllerAjo is an AussomJavaObject around a com.almasb.fxgl.ui.UIController.
  • adopt (object Ajo)

    Wraps an existing UI AussomJavaObject.

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

    Returns the controller paired with this UI as a raw AussomJavaObject. Callers can pass it to the UIController wrapper's adopt method when it is an AussomUIController.

    • @r An AussomJavaObject around a UIController.