Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: Option

[13:7] extends: FxObj

Wraps FXGL's Option (com.almasb.fxgl.cutscene.dialogue.Option), a single player choice on a TextNode. Each option has an id (its index in the node's options list), display text, and a condition string evaluated against the dialogue context.

Methods

  • Option (int Id = -1, string Text = "", string Condition = "")

    Creates a new Option with the given id, text, and condition. Pass -1 for Id to construct an empty wrapper for adopt.

    • @p Id is the option id (index in the parent TextNode's options list).
    • @p Text is the display text.
    • @p Condition is the FXGL condition string.
  • adopt (object Ajo)

    Wraps an existing Option AussomJavaObject.

    • @p Ajo is an AussomJavaObject around an Option.
    • @r A new wrapper.
  • getId ()

    Returns the option id.

    • @r An int.
  • getText ()

    Returns the option display text.

    • @r A string.
  • getCondition ()

    Returns the FXGL condition string.

    • @r A string.
  • idProperty ()

    Returns the IntegerProperty backing the option id for binding.

    • @r An AussomJavaObject around an IntegerProperty.
  • textProperty ()

    Returns the StringProperty backing the option text.

    • @r An AussomJavaObject around a StringProperty.
  • conditionProperty ()

    Returns the StringProperty backing the condition.

    • @r An AussomJavaObject around a StringProperty.
  • copy ()

    Returns a copy of this Option.

    • @r A new Option wrapper.
  • getIdProperty ()

    Returns the id IntegerProperty AJO for binding.

  • getTextProperty ()

    Returns the text StringProperty AJO for binding.

  • getConditionProperty ()

    Returns the condition StringProperty AJO for binding.