YarnActionMarkupHandlerNode
Node-based base class for display-time action markup handlers.
class_name YarnActionMarkupHandlerNode
extends NodeInherits from Node
Attach this as a node in your scene (so it can reference other nodes, find characters, and so on), then add it to a YarnLinePresenter's YarnLinePresenter.event_handlers list. The presenter invokes these methods as each character of a line is revealed. Override only the methods you need; the defaults are no-ops. This is the scene-attached counterpart to the RefCounted YarnActionMarkupHandler interface, which is used for handlers constructed in code (such as the built-in pause processor).
#Methods
#get_attributes_at_index(int, Array)
Returns all attributes covering a specific character index.
static func get_attributes_at_index(index: int, attributes: Array) -> Array[YarnMarkupAttribute]Parameters
indexintattributesArray
Returns Array[YarnMarkupAttribute]
#is_index_in_attribute(int, YarnMarkupAttribute)
Returns true if
index falls within attr's span.static func is_index_in_attribute(index: int, attr: YarnMarkupAttribute) -> boolParameters
indexint
Returns bool
#on_character_will_appear(int, Variant, Variant)
Called for each character as it is about to be revealed. Return a
Signal to pause the typewriter until it fires, or an empty Signal() to continue immediately.func on_character_will_appear(_character_index: int, _line: Variant, _cancellation_token: Variant = null) -> SignalParameters
_character_indexint_lineVariant_cancellation_tokenVariant
Returns Signal
#on_line_display_begin(Variant, Control)
Called immediately before the first character is presented.
func on_line_display_begin(_line: Variant, _text_control: Control = null) -> voidParameters
_lineVariant_text_controlControl
#on_line_display_complete()
Called after every character has been presented.
func on_line_display_complete() -> void#on_line_will_dismiss()
Called right before the line is dismissed.
func on_line_will_dismiss() -> void#on_prepare_for_line(Variant, Control)
Called once when the line is received, before any text is visible. Set up per-line state here (e.g. scan the line's markup attributes).
func on_prepare_for_line(_line: Variant, _text_control: Control = null) -> voidParameters
_lineVariant_text_controlControl
Generated from Yarn Spinner for Godot GDScript 3.3.