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

Add print_rich() support to Debug Console #792

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jnoel-dev
Copy link

Adds print_rich()/bbcode support to Debug Console
Sets Debug Console text color to grey (To match Godot console output)
Changes how lines are outputted to Debug Console. (Previously was printing lines in chunks/groups instead of line by line)

Limitations:

  1. Debug console will still parse bbcode in regular print() statements. I am not sure if there is a way to determine if print_rich() was used...
  2. Not supported for Godot 3.6 or below
  3. [center] and [right] tags are emulated with spaces. May not be accurate depending on terminal size.

Tested working on Linux, Windows
Tested working on Godot4.4b3,Godot4.3

using this to parse https://github.com/jnoel-dev/bbcode-to-ansi based on @Calinou 's https://github.com/Calinou/godot-bbcode-to-ansi

before
image

after
image

@Calinou
Copy link
Member

Calinou commented Feb 11, 2025

Changes how lines are outputted to Debug Console. (Previously was printing lines in chunks/groups instead of line by line)

Does this PR close #791?

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

Successfully merging this pull request may close these issues.

2 participants