Skip to content

Commit

Permalink
Use text Variable for Addition of Prefix/Suffix.
Browse files Browse the repository at this point in the history
  • Loading branch information
CakeVR committed Nov 11, 2024
1 parent 24be6ce commit b10f375
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions addons/dialogic/Modules/Text/subsystem_text.gd
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,9 @@ func update_dialog_text(text: String, instant := false, additional := false) ->
if current_character:
var character_prefix: String = current_character.custom_info.get(DialogicCharacterPrefixSuffixSection.PREFIX_CUSTOM_KEY, DialogicCharacterPrefixSuffixSection.DEFAULT_PREFIX)
var character_suffix: String = current_character.custom_info.get(DialogicCharacterPrefixSuffixSection.SUFFIX_CUSTOM_KEY, DialogicCharacterPrefixSuffixSection.DEFAULT_SUFFIX)
var text_with_fixes := character_prefix + text + character_suffix
text_node.reveal_text(text_with_fixes, additional)
else:
text_node.reveal_text(text, additional)
text = character_prefix + text + character_suffix

text_node.reveal_text(text, additional)

if !text_node.finished_revealing_text.is_connected(_on_dialog_text_finished):
text_node.finished_revealing_text.connect(_on_dialog_text_finished)
Expand Down

0 comments on commit b10f375

Please sign in to comment.