Text

This contains the source code documentation of the class subsystem_Text.

subsystem_Text

Inherits: DialogicSubsystem

Subsystem that handles showing of dialog text (+text effects & modifiers), name label, and next indicator

Properties


Methods

ReturnsMethod
voidclear_game_state ( clear_flag: int = 0 )
voidcollect_character_names ( )
voidcollect_text_effects ( )
voidcollect_text_modifiers ( )
Stringcolor_names ( text: String )
voidconnect_meta_signals ( text_node: Node )
voideffect_lspeed ( text_node: Control, skipped: bool, argument: String )
voideffect_mood ( text_node: Control, skipped: bool, argument: String )
voideffect_pause ( text_node: Control, skipped: bool, argument: String )
voideffect_signal ( text_node: Control, skipped: bool, argument: String )
voideffect_speed ( text_node: Control, skipped: bool, argument: String )
voidemit_meta_signal ( meta: Variant, sig: String )
voidexecute_effects ( current_index: int, text_node: Control, skipping: bool = false )
Stringget_character_name_parsed ( character: DialogicCharacter )
DialogicCharacterget_current_speaker ( )
voidhide_next_indicators ( _fake_arg: Variant = null )
voidhide_textbox ( instant: bool = false )
boolis_text_reveal_skippable ( )
boolis_text_voice_synced ( )
boolis_textbox_visible ( )
voidload_game_state ( load_flag: int = 0 )
Stringmodifier_autopauses ( text: String )
Stringmodifier_break ( text: String )
Stringmodifier_random_selection ( text: String )
Stringparse_text ( text: String, type: int = 0, variables: bool = true, glossary: bool = true, modifiers: bool = true, effects: bool = true, color_names: bool = true )
Stringparse_text_effects ( text: String )
Stringparse_text_modifiers ( text: String, type: int = 0 )
voidpost_install ( )
voidset_text_reveal_skippable ( skippable: bool = true, temp: bool = false )
voidset_text_voice_synced ( enabled: bool = true )
voidshow_next_indicators ( question: bool = false, autoadvance: bool = false )
voidshow_textbox ( instant: bool = false )
voidskip_text_reveal ( )
Stringupdate_dialog_text ( text: String, instant: bool = false, additional: bool = false )
voidupdate_name_label ( character: DialogicCharacter )
voidupdate_text_speed ( letter_speed: float = -1.0, absolute: bool = false, speed_multiplier: float = <unknown>, user_speed: float = <unknown> )
voidupdate_textbox ( text: String, instant: bool = false )
voidupdate_typing_sound_mood ( mood: Dictionary = <unknown> )

Constants

const ALL = -1

No description available.


const TEXT_ONLY = 0

No description available.


const CHOICES_ONLY = 1

No description available.


const DIALOG_TEXT = 0

No description available.


const CHOICE_TEXT = 1

No description available.


Signals

signal about_to_show_text ( info: Dictionary )

No description available.


signal animation_textbox_hide ( )

No description available.


signal animation_textbox_new_text ( )

No description available.


signal animation_textbox_show ( )

No description available.


signal meta_clicked ( meta: Variant )

No description available.


signal meta_hover_ended ( meta: Variant )

No description available.


signal meta_hover_started ( meta: Variant )

No description available.


signal speaker_updated ( character: DialogicCharacter )

No description available.


signal text_finished ( info: Dictionary )

No description available.


signal textbox_visibility_changed ( visible: bool )

No description available.


Property Descriptions

var character_colors =

No description available.


var color_regex =

No description available.


var modifier_words_select_regex =

No description available.


var parsed_text_effect_info =

No description available.


var text_already_read = false

No description available.


var text_effects =

No description available.


var text_effects_regex =

No description available.


var text_modifiers =

No description available.


Method Descriptions

func clear_game_state ( clear_flag: int = 0 ) ⇒ void

No description available.


func collect_character_names ( ) ⇒ void

No description available.


func collect_text_effects ( ) ⇒ void

No description available.


func collect_text_modifiers ( ) ⇒ void

No description available.


func color_names ( text: String ) ⇒ String

No description available.


func connect_meta_signals ( text_node: Node ) ⇒ void

No description available.


func effect_lspeed ( text_node: Control, skipped: bool, argument: String ) ⇒ void

No description available.


func effect_mood ( text_node: Control, skipped: bool, argument: String ) ⇒ void

No description available.


func effect_pause ( text_node: Control, skipped: bool, argument: String ) ⇒ void

No description available.


func effect_signal ( text_node: Control, skipped: bool, argument: String ) ⇒ void

No description available.


func effect_speed ( text_node: Control, skipped: bool, argument: String ) ⇒ void

No description available.


func emit_meta_signal ( meta: Variant, sig: String ) ⇒ void

No description available.


func execute_effects ( current_index: int, text_node: Control, skipping: bool = false ) ⇒ void

No description available.


func get_character_name_parsed ( character: DialogicCharacter ) ⇒ String

Parses the character's display_name and returns the text that should be rendered. Note that characters may have variables in their name, therefore this function should be called to evaluate any potential variables in a character's name.


func get_current_speaker ( ) ⇒ DialogicCharacter

Returns the DialogicCharacter of the current speaker. If there is no current speaker or the speaker is not found, returns null.


func hide_next_indicators ( _fake_arg: Variant = null ) ⇒ void

No description available.


func hide_textbox ( instant: bool = false ) ⇒ void

Instant skips the signal and thus possible animations


func is_text_reveal_skippable ( ) ⇒ bool

No description available.


func is_text_voice_synced ( ) ⇒ bool

Returns whether voice-synced text is enabled.


func is_textbox_visible ( ) ⇒ bool

No description available.


func load_game_state ( load_flag: int = 0 ) ⇒ void

No description available.


func modifier_autopauses ( text: String ) ⇒ String

No description available.


func modifier_break ( text: String ) ⇒ String

No description available.


func modifier_random_selection ( text: String ) ⇒ String

No description available.


func parse_text ( text: String, type: int = 0, variables: bool = true, glossary: bool = true, modifiers: bool = true, effects: bool = true, color_names: bool = true ) ⇒ String

Applies modifiers, effects and coloring to the text


func parse_text_effects ( text: String ) ⇒ String

Returns the string with all text effects removed Use get_parsed_text_effects() after calling this to get all effect information


func parse_text_modifiers ( text: String, type: int = 0 ) ⇒ String

No description available.


func post_install ( ) ⇒ void

No description available.


func set_text_reveal_skippable ( skippable: bool = true, temp: bool = false ) ⇒ void

No description available.


func set_text_voice_synced ( enabled: bool = true ) ⇒ void

This method will sync the text speed to the voice audio clip length, if a voice is playing. For instance, if the voice is playing for four seconds, the text will finish revealing after this time. This feature ignores Auto-Pauses on letters. Pauses via BBCode will desync the reveal.


func show_next_indicators ( question: bool = false, autoadvance: bool = false ) ⇒ void

No description available.


func show_textbox ( instant: bool = false ) ⇒ void

instant skips the signal and thus possible animations


func skip_text_reveal ( ) ⇒ void

No description available.


func update_dialog_text ( text: String, instant: bool = false, additional: bool = false ) ⇒ String

Shows the given text on all visible DialogText nodes. Instant can be used to skip all revieling. If additional is true, the previous text will be kept.


func update_name_label ( character: DialogicCharacter ) ⇒ void

Updates the visible name on all name labels nodes. If a name changes, the speaker_updated signal is emitted.


func update_text_speed ( letter_speed: float = -1.0, absolute: bool = false, speed_multiplier: float = <unknown>, user_speed: float = <unknown> ) ⇒ void

Sets how fast text will be revealed. absolute will force test to display at the given speed, regardless of the user's text speed setting. _speed_multiplier adjusts the speed of the text, if set to -1, the value won't be updated and the current value will persist. _user_speed adjusts the speed of the text, if set to -1, the project setting 'text_speed' will be used.operator


func update_textbox ( text: String, instant: bool = false ) ⇒ void

When an event updates the text spoken, this can adjust the state of the dialog text box. This method is async.


func update_typing_sound_mood ( mood: Dictionary = <unknown> ) ⇒ void

No description available.