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
Name | Type | Default |
---|---|---|
character_colors | Dictionary | {} |
color_regex | RegEx | new() |
text_already_read | bool | false |
text_effects | Dictionary | {} |
parsed_text_effect_info | Dictionary[] | [] |
text_effects_regex | RegEx | new() |
text_modifiers | Array | [] |
modifier_words_select_regex | RegEx | create_from_string(...) |
Methods
Returns | Method |
---|---|
void | clear_game_state ( _clear_flag : int = 0 ) |
void | load_game_state ( _load_flag : int = 0 ) |
void | post_install ( ) |
String | parse_text ( text : String, type : int = 0 , variables : bool = true , glossary : bool = true , modifiers : bool = true , effects : bool = true , color_names : bool = true ) |
void | update_textbox ( text : String, instant : bool = false ) |
String | update_dialog_text ( text : String, instant : bool = false , additional : bool = false ) |
void | update_name_label ( character : DialogicCharacter ) |
void | update_typing_sound_mood ( mood : Dictionary = {} ) |
void | show_textbox ( instant : bool = false ) |
void | hide_textbox ( instant : bool = false ) |
bool | is_textbox_visible ( ) |
void | show_next_indicators ( question : bool = false , autoadvance : bool = false ) |
void | hide_next_indicators ( _fake_arg : Variant = null ) |
void | set_text_voice_synced ( enabled : bool = true ) |
bool | is_text_voice_synced ( ) |
void | update_text_speed ( letter_speed : float = -1.0 , absolute : bool = false , speed_multiplier : float = _speed_multiplier , user_speed : float = get_setting(...) ) |
void | set_text_reveal_skippable ( skippable : bool = true , temp : bool = false ) |
bool | is_text_reveal_skippable ( ) |
void | skip_text_reveal ( ) |
void | collect_text_effects ( ) |
String | parse_text_effects ( text : String ) |
void | execute_effects ( current_index : int, text_node : Control, skipping : bool = false ) |
void | collect_text_modifiers ( ) |
String | parse_text_modifiers ( text : String, type : int = 0 ) |
String | get_character_name_parsed ( character : DialogicCharacter ) |
DialogicCharacter | get_current_speaker ( ) |
void | connect_meta_signals ( text_node : Node ) |
void | emit_meta_signal ( meta : Variant, sig : String ) |
String | color_character_names ( text : String ) |
void | collect_character_names ( ) |
bool | sort_by_length ( a : String, b : String ) |
void | effect_pause ( _text_node : Control, skipped : bool, argument : String ) |
void | effect_speed ( _text_node : Control, skipped : bool, argument : String ) |
void | effect_lspeed ( _text_node : Control, skipped : bool, argument : String ) |
void | effect_signal ( _text_node : Control, _skipped : bool, argument : String ) |
void | effect_mood ( _text_node : Control, _skipped : bool, argument : String ) |
String | modifier_random_selection ( text : String ) |
String | modifier_break ( text : String ) |
String | modifier_autopauses ( text : String ) |
Constants
No description available.
No description available.
No description available.
No description available.
No description available.
Signals
signal about_to_show_text ( info
: Dictionary )
No description available.
signal text_finished ( info
: Dictionary )
No description available.
signal speaker_updated ( character
: DialogicCharacter )
No description available.
signal textbox_visibility_changed ( visible
: bool )
No description available.
signal animation_textbox_new_text ( )
No description available.
signal animation_textbox_show ( )
No description available.
signal animation_textbox_hide ( )
No description available.
signal meta_hover_ended ( meta
: Variant )
No description available.
signal meta_hover_started ( meta
: Variant )
No description available.
signal meta_clicked ( meta
: Variant )
No description available.
Property Descriptions
No description available.
No description available.
No description available.
No description available.
var parsed_text_effect_info = []
No description available.
var text_effects_regex = new()
No description available.
No description available.
var modifier_words_select_regex = create_from_string(...)
No description available.
Method Descriptions
func clear_game_state ( _clear_flag
: int = 0
) ⇒ void
No description available.
func load_game_state ( _load_flag
: int = 0
) ⇒ void
No description available.
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 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_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_typing_sound_mood ( mood
: Dictionary = {}
) ⇒ void
No description available.
func show_textbox ( instant
: bool = false
) ⇒ void
instant skips the signal and thus possible animations
func hide_textbox ( instant
: bool = false
) ⇒ void
Instant skips the signal and thus possible animations
func is_textbox_visible ( ) ⇒ bool
No description available.
func show_next_indicators ( question
: bool = false
, autoadvance
: bool = false
) ⇒ void
No description available.
func hide_next_indicators ( _fake_arg
: Variant = null
) ⇒ 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 is_text_voice_synced ( ) ⇒ bool
Returns whether voice-synced text is enabled.
func update_text_speed ( letter_speed
: float = -1.0
, absolute
: bool = false
, speed_multiplier
: float = _speed_multiplier
, user_speed
: float = get_setting(...)
) ⇒ void
Sets how fast text will be revealed.
letter_speed
is the speed a single text character takes to appear on the textbox.
absolute
will force text 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 set_text_reveal_skippable ( skippable
: bool = true
, temp
: bool = false
) ⇒ void
No description available.
func is_text_reveal_skippable ( ) ⇒ bool
No description available.
func skip_text_reveal ( ) ⇒ void
No description available.
func collect_text_effects ( ) ⇒ void
No description available.
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 execute_effects ( current_index
: int, text_node
: Control, skipping
: bool = false
) ⇒ void
No description available.
func collect_text_modifiers ( ) ⇒ void
No description available.
func parse_text_modifiers ( text
: String, type
: int = 0
) ⇒ String
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 connect_meta_signals ( text_node
: Node ) ⇒ void
No description available.
func emit_meta_signal ( meta
: Variant, sig
: String ) ⇒ void
No description available.
func color_character_names ( text
: String ) ⇒ String
No description available.
func collect_character_names ( ) ⇒ void
No description available.
func sort_by_length ( a
: String, b
: String ) ⇒ bool
No description available.
func effect_pause ( _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 effect_lspeed ( _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_mood ( _text_node
: Control, _skipped
: bool, argument
: String ) ⇒ void
No description available.
func modifier_random_selection ( text
: String ) ⇒ String
No description available.
func modifier_break ( text
: String ) ⇒ String
No description available.
func modifier_autopauses ( text
: String ) ⇒ String
No description available.