Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: DialogueNode

[16:7] extends: FxObj

Wraps FXGL's DialogueNode (com.almasb.fxgl.cutscene.dialogue.DialogueNode), the sealed abstract base for every node in a DialogueGraph. Cannot be instantiated directly; use TextNode, BranchNode, FunctionNode, or SubDialogueNode. This wrapper exposes the common surface (type, text, audio file name) for callers that hold a generic node reference (e.g. through DialogueGraph.getNodeByID).

Methods

  • DialogueNode ()

    Constructs an empty wrapper; use adopt to populate.

  • adopt (object Ajo)

    Wraps an existing DialogueNode AussomJavaObject.

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

    Returns the node's DialogueNodeType.

    • @r An AussomJavaObject around a DialogueNodeType enum value.
  • getText ()

    Returns the node's text content.

    • @r A string.
  • textProperty ()

    Returns the node's text StringProperty for binding to UI.

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

    Returns the audio file name associated with this node (empty string when no audio is set).

    • @r A string.
  • audioFileNameProperty ()

    Returns the audio file name StringProperty for binding.

    • @r An AussomJavaObject around a StringProperty.