Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: StringComponent

[17:7] extends: Component

Wraps an AussomStringComponent (concrete subclass of FXGL's abstract StringComponent). Exposes a string value backed by a JavaFX StringProperty plus standard Component lifecycle methods inherited from Component. Attach to an Entity via entity.addComponent.

Methods

  • StringComponent (string InitialValue = "")

    Creates a new StringComponent with the given initial value.

    • @p InitialValue is the starting string (defaults to "").
  • adopt (object Ajo)

    Wraps an existing AussomStringComponent AussomJavaObject.

  • getValue ()

    Returns the current string value.

  • setValue (string Val)

    Sets the string value.

    • @p Val is the new string.
    • @r this object
  • valueProperty ()

    Returns the underlying StringProperty for binding.

  • write (object BundleObj)

    Persists this component's value into a Bundle.

  • read (object BundleObj)

    Restores this component's value from a Bundle.