Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: EntityInspector

[20:7] extends: FXGLScrollPane

Wraps FXGL's EntityInspector (com.almasb.fxgl.dev.editor.EntityInspector), a FXGLScrollPane that renders an editable view of an Entity's components: lists every Property-returning getter, provides buttons to add a view image, add a built-in component, or add a custom component from a compiled .class file. Used in the FXGL editor / dev tooling; game code rarely touches it.

Methods

  • EntityInspector (bool Construct = true)

    Creates a new EntityInspector. Pass false to construct an empty wrapper for adopt; the default (true) instantiates the engine class, which requires a running FXGL engine and JavaFX runtime.

    • @p Construct is true to instantiate immediately, false for an empty wrapper.
  • adopt (object Ajo)

    Wraps an existing EntityInspector AussomJavaObject.

    • @p Ajo is an AussomJavaObject around an EntityInspector.
    • @r A new wrapper.
  • getEntity ()

    Returns the inspected Entity (may be null when nothing is selected).

    • @r An AussomJavaObject around an Entity, or null.
  • setEntity (object EntityObj)

    Sets the inspected Entity, rebuilding the view to match its components. Pass null to clear.

    • @p EntityObj is an Entity wrapper, or null.
    • @r this object
  • onAdded (object ComponentObj)

    Component-added listener hook (ComponentListener interface method). Adds a view row for the newly added component.

    • @p ComponentObj is an AussomJavaObject around a Component.
    • @r this object
  • onRemoved (object ComponentObj)

    Component-removed listener hook (ComponentListener interface method).

    • @p ComponentObj is an AussomJavaObject around a Component.
    • @r this object