Long story short: I want to achieve this kind of textbox.
So: the text should scroll (= adding letters one by one) until it reaches the limit of the textbox, then waits for player input. After which, all of the text moves up one line, printing a new line, repeating this for 3 new lines until the box awaits player input again. All of this repeats again until all the text is gone.
Right now I'm trying to replicate this by using a normal label ("txt") with Autowrap and Clip Text set to true. I also have rudimentary code:
func scrollText(delta):
tween.interpolate_property(txt, "percent_visible", 0, 1, len(txt.text) * scrollSpd, tween.TRANS_LINEAR, tween.EASE_IN_OUT)
tween.start()
So text scrolling works, but is there a way to check how many lines are visible according to visible text and making it stop? Or is there at least some way to get Godot to return when it needs to break a line? Godot obviously knows WHEN to do it but how do I access that? Or is there generally a better approach?
I checked out functions like get_line_count(), but that unfortunately seems to count all the lines regardless of whether the text is visible or not. Anything else I can use? I'm on Godot 3.5 btw!
Thanks in advance!!