Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing with print_rich a lot of colored text breaks formating after output overflow. #78520

Closed
RonYanDaik opened this issue Jun 21, 2023 · 2 comments · Fixed by #79011
Closed

Comments

@RonYanDaik
Copy link

Godot version

4.1

System information

Win 10

Issue description

image

When causing "output oveflow" by printing a lot of text, formating breaks. Possible because enclosing tag get flushed.

Suggested solution: clear text formating after output oveflow warning.

Steps to reproduce

Print a lot of text with different text tags (like [color] or [bgcolor]) to console. For example in _process function.

Minimal reproduction project

N/A

@Calinou
Copy link
Member

Calinou commented Jun 21, 2023

@bruvzg Is there a way to close formatting for all currently open tags in RichTextLabel? We could use print_rich() for this before printing the "[output overflow, print less text!]" error.

@bruvzg
Copy link
Member

bruvzg commented Jun 21, 2023

There's no exposed function for this, but it should be easy to implement it, something like:

void RichTextLabel::pop_all() {
	_stop_thread();
	MutexLock data_lock(data_mutex);

	current = main;
	current_frame = main;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants