Skip to content

Commit 4fd35b2

Browse files
Change clear event to use textbox fade animation length (#2696)
This slightly changes the behaviour of the clear event. Instead of the given time, it will now just await the textbox hide animation. This is good because previously it would default to a second of delay when the textbox animation was instant, which felt very unexpected to users, especially now that a clear event is automatically added at the end of dialog.
1 parent a9b207d commit 4fd35b2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

addons/dialogic/Modules/Clear/event_clear.gd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ func _execute() -> void:
2828

2929
if clear_textbox and dialogic.has_subsystem("Text") and dialogic.Text.is_textbox_visible():
3030
dialogic.Text.update_dialog_text('')
31-
dialogic.Text.hide_textbox(final_time == 0)
31+
if step_by_step:
32+
await dialogic.Text.hide_textbox(final_time == 0)
33+
else:
34+
dialogic.Text.hide_textbox(final_time == 0)
3235
dialogic.current_state = dialogic.States.IDLE
33-
if step_by_step: await dialogic.get_tree().create_timer(final_time).timeout
3436

3537
if clear_portraits and dialogic.has_subsystem('Portraits') and len(dialogic.Portraits.get_joined_characters()) != 0:
3638
if final_time == 0:

0 commit comments

Comments
 (0)