Skip to content

DialogueLabel with history #481

Closed Answered by oninoshiko
oninoshiko asked this question in Q&A
Discussion options

You must be logged in to vote

Nevermind. I was able to transfer the text into a RichTextLabel using append text to get what I needed. If anyone else is looking to do this, here's what I did:

func _on_finished_typing() -> void:
	%RichTextLabel.push_paragraph(HORIZONTAL_ALIGNMENT_LEFT)
	%RichTextLabel.append_text(%DialogueLabel.text)
	%RichTextLabel.pop()
	
	var para:int = %RichTextLabel.get_paragraph_count()
	if para > 50:
		%RichTextLabel.remove_paragraph(para - 1)
	
	%DialogueLabel.text=""

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by oninoshiko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant